Every Physics "Overlap" Visualized | Unity Tutorial

Поділитися
Вставка
  • Опубліковано 6 лип 2024
  • Go to this video's Sponsor: snhu.edu/llamacademy to learn more about their accredited degree programs that can help you level up your gamedev skillset!
    Everyone talks about Raycasts and Spherecasts, but rarely do I see people talking about the Overlap APIs. Learn about a powerful tool that I feel is under-represented.
    Physics OverlapBox, OverlapSphere, and OverlapCapsule are great tools to use when you are looking to find what's around a point in your scene. This can be helpful when trying to find nearby objects, or if there is enough space to put something down.
    💸 Ongoing sales 💸
    ⚫ Check out the latest Humble Bundles www.humblebundle.com/software...
    ⚫ Publisher Sale! 50% OFF an entire publisher's Assets! Publisher changes weekly! assetstore.unity.com/publishe...
    ⚫ Save up to 50% on NEW Assets: assetstore.unity.com/?new_sal...
    👨‍💻 As always, all code from this video is available on GitHub: github.com/llamacademy/physic...
    📚 Resources:
    ⚫ Unity Physics API Documentation: docs.unity3d.com/ScriptRefere...
    ⚫ Raycasting, Explained: • Raycasts, Explained. E...
    ❤ Believe in LlamAcademy's mission and have received value from the videos? Become a Supporter:
    ⚫ Patreon: / llamacademy
    ⚫ UA-cam Member: / @llamacademy or click the Join button on any video
    ⚫ GitHub Sponsor: github.com/sponsors/llamacademy
    ----
    I also have some Unity Assets: assetstore.unity.com/publishe...
    Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.
    #unitytutorial #tutorialtuesday #gamedev #tutorial #unity #llamacademy #gamedevelopment
    Chapters:
    00:00 What is Physics Overlap?
    02:00 When would you use it versus "casting"?
    02:13 Sponsor - Southern New Hampshire University
    03:35 OverlapSphere
    05:28 OverlapBox
    06:28 OverlapCapsule
    07:28 Important note about how these work
    08:08 What about Optimization?
    10:48 Support LlamAcademy!

КОМЕНТАРІ • 27

  • @LlamAcademy
    @LlamAcademy  9 місяців тому +1

    Go to this video's Sponsor: snhu.edu/llamacademy to learn more about their accredited degree programs that can help you level up your gamedev skillset!

  • @AlexisBleeding4
    @AlexisBleeding4 9 місяців тому +3

    I love your vids. Super informative. Thanks for all ♥

  • @carlt8693
    @carlt8693 9 місяців тому +1

    i really like how you explain everything, very visual!
    Thank you

  • @dreamisover9813
    @dreamisover9813 9 місяців тому +1

    That was a pretty cool video idea!

  • @jednooki555
    @jednooki555 Місяць тому +1

    Great video!

  • @Massive-3D
    @Massive-3D 5 місяців тому

    Another excellent chill video I basically left it running in the background on my first screen while I did my game dev on the other screen.
    I'm using cheat engine to show me the XYZ coordinates of the player in my favorite PS2 games so I can plot the points and recreate the levels in my own game (much differently)

  • @mohamedmusthafa1057
    @mohamedmusthafa1057 9 місяців тому +1

    Wow I love ur Videos ❤

  • @raphaeljaggerd3585
    @raphaeljaggerd3585 9 місяців тому +3

    Love your content bruv. I used to feel like you were too complicated but turns out i was just dumb. Would love to see you recreate mechanics from popular games if thats something youd consider doing.

    • @LlamAcademy
      @LlamAcademy  9 місяців тому +1

      😅 I'm sure you were not and are not dumb. There are levels to everything. Being earlier on in the journey does not make you dumb. We were all there once!

    • @raphaeljaggerd3585
      @raphaeljaggerd3585 9 місяців тому +1

      Thank you. And thank you for the great tutorials.@@LlamAcademy

  • @shubhamdhumal7578
    @shubhamdhumal7578 9 місяців тому

    Hi great video, i followed your HFSM video can help or make video about how make melecombat subsate machine with multiple attack types and enemy animations

  • @avshkabura
    @avshkabura 9 місяців тому +1

    Hello from Ukraine, thank you for you work)

  • @1x5x7
    @1x5x7 9 місяців тому +1

    Neat video! But is there actually a difference in using, for example, OverlapSphere over SphereCast for detection?

    • @LlamAcademy
      @LlamAcademy  9 місяців тому +1

      Yes very much so. If you use a spherecast and the origin point is already overlapping something, you will not get that object as a hit.

  • @0xF81
    @0xF81 9 місяців тому +2

    9:30 I wish you would mention what will happen if your colliders array is for example 10 but in the world game the Physics have found 11 or more colliders
    Here is my answer: No error will appear and the game will continue to run limiting the results to the size of the array so if there's 10+ colliders they'll be omitted

    • @LlamAcademy
      @LlamAcademy  9 місяців тому +1

      That is correct. If you have 50 objects in the overlap radius but your collider is only of size 10, you will still only get 10 because with NonAlloc variants it does not resize your array for you and it will only give you an undefined set of 10 that may or may not be the closest to the origin

  • @Hazzel31337
    @Hazzel31337 9 місяців тому +1

    thanks for the video i always had some trouble with understanding them, i cant use your sponsor i am already enrolled with the
    LlamAcademy :D

  • @XadegamerOfficial
    @XadegamerOfficial 9 місяців тому

    How did you debug the sphere cast?

  • @manueltaveras3546
    @manueltaveras3546 9 місяців тому +1

    I am into your channel. Can you make a video about using git workflow and unity?

    • @LlamAcademy
      @LlamAcademy  9 місяців тому

      Like this one?
      ua-cam.com/video/vq5zuXBzlW8/v-deo.html

  • @stevennassef
    @stevennassef 9 місяців тому +1

    I like your videos, but i hate that cringy intro.