Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Raycasts, Explained. See Every Physics "Cast" in Unity Visualized

Discussion in 'Community Learning & Teaching' started by ChrisKurhan, Aug 9, 2022.

  1. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    268


    Hey all! Happy #TutorialTuesday!

    Many of us kind of jumped into gamedev without a solid understanding of "casting", like Raycast and Spherecast. In this video I aim to make it really clear how each of the Ray, Sphere, Box, and Capsule casts work, look, behave, and how you can use each one of them to achieve your "casting" goals!

    In this tutorial video you can see the following "casts" visualized:
    1. Raycast
    2. RaycastAll
    3. Spherecast
    4. SpherecastAll
    5. Boxcast
    6. BoxcastAll
    7. Capsulecast
    8. CapsulecastAll

    each with different variations with trigger collision, layer masking, and more!
    With 19 customizable scenarios, you know the full project being available on GitHub will help you better understand how to use each of these fundamental gamedev functions!