How to DETECT OBJECTS INSIDE COLLIDERS in Unity - On Trigger Events

แชร์
ฝัง

ความคิดเห็น •

  • @GameDevTraumEN
    @GameDevTraumEN  11 หลายเดือนก่อน

    *My Unity repository* 👉 github.com/GameDevTraum/GDT-Solutions-for-Unity
    *Complete Unity PLAYLIST:* th-cam.com/video/O6uvrwp1Gj4/w-d-xo.html

  • @AverageFourty
    @AverageFourty หลายเดือนก่อน

    Collider detection is really easy when you show us how it's done. I recall this being an extremely exhausting process (to newbies), and I probably had all kinds of wrong components on things for a basic collision test. Bravo & Thanks for this!

  • @zentec010
    @zentec010 ปีที่แล้ว

    Wow this is perfect I just learned three functions that are going to change my approach on my game I'm making.

    • @GameDevTraumEN
      @GameDevTraumEN  ปีที่แล้ว +1

      excellent!! I'm happy you find this information useful.
      You may also be interested to know about other functions that involved colliders and collisions, they are the OnCollision events (instead of the OnTrigger events), I leave a couple videos about that:
      About OnCollision events:
      th-cam.com/video/bukNHwYH85Q/w-d-xo.html
      Play sounds on collision:
      th-cam.com/video/lBTtzqfaNdM/w-d-xo.html
      Broken glass effect on collsion:
      th-cam.com/video/91JruzwZTHQ/w-d-xo.html
      You can mix OnTrigger events and OnCollision events to solve different problems, the main difference is that the OnTrigger events require a "Trigger" collider, which doesn't act like an obstacle, so you can detect objects inside that collider. On the other hand in the on collision events you detect when two normal colliders touch each other.

    • @MarcosStudioDevelopers
      @MarcosStudioDevelopers 11 หลายเดือนก่อน +1

      @@GameDevTraumEN Where is the link to the scripts?

    • @GameDevTraumEN
      @GameDevTraumEN  11 หลายเดือนก่อน

      @@MarcosStudioDevelopers Currently I have a free Unity Package on my itch.io page:
      gamedevtraum.itch.io/play-sound-on-collisions-in-unity-example-prototype
      That package is related to the "Sounds on collision" and "Broken glass effect" videos from my channel.
      Inside you'll find a scene where everything is already set up, you can press play and see the result. The scripts are also included