How to make SphereCastAll retrieve all hits with a concave mesh ?
Hi !
I tried to use SphereCastAll to retrieve all the hits within a concave mesh, but it only returns the first hit. From what I understood, physics casts are made to find colliders, but once they've hit one, they won't hit it again even if the mesh is concave with multiple possible hits ...
After some investigation I found that for Raycast a trick is to not do RaycastAll, but do multiple single Raycasts, each starting from the hit.point of the previous one. The problem with SphereCast is the radius, plus the fact that if the mesh overlaps the starting cast sphere position, the collider gets ignored. So instead of having the next hit (like in the Raycast trick), I get nothing.
It seems almost impossible to have what I would like to have ("a SphereCastAll retrieving all the hits with concave meshes"), but that's a shame because the logic is simple: A way to make a physic "castall" not ignore a collider he already hit, would solve the whole thing :D
Do someone have a workaround I could try ?
Thanks a lot!
Your answer
Follow this Question
Related Questions
Spawned objects sink through ground, when over 3 clones 0 Answers
Having Troubles with Sphere Casts 0 Answers
Collision Detection issue 1 Answer
How to determine on collision if an object is rotated in a certain way 1 Answer
Intersecting edge colliders cause particles to pass through one edge collider? 1 Answer