The Physics.Raycast() API allows me to cast single rays through the scene to detect collisions. Is there something similar to sweep a capsule or sphere through a scene that returns data on the hits? So far I’ve only found Physics.CheckCapsule() and Physics.CheckSphere() which seem to be doing that but sadly they don’t return the actual hit data, which I need.
This post is old, but I have the same question. I need to know what Physics.CheckCapsule() hit. Does anyone know a workaround for having a CheckCapsule() that returns data?
well this question is still old just made a quick Google search and viola here we are
for me i wanted to check if an object was blocking the path of the player to move the player away from the object but i couldn’t get the hit point so i just went an extra mile to cast two more capsules in opposite directions the first of the two capsules that stops hitting any collider i move the player along that direction