Search Unity

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!