- Home /
Detecting how much of a Sphere is overlapped
I'm currently working on a system which requires an "Overlap Sphere" cast to detect how much of the sphere is filled by an object. As an example, I may have 3 objects within the sphere; the ground, a wall and the player.
I ignore the player with a layermask, and attempt to detect the other two. I want to know whether there is more floor or more wall within the cast as I intend to use this data later.
If there is no way of using the "Overlap Sphere" cast for this, alternative suggestions would be appreciated.
Your answer
![](https://koobas.hobune.stream/wayback/20220611232036im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
SphereCast for Camera 0 Answers
overlapsphere to destroy NPCs on exit 1 Answer
Non-PhysX sphere - AABB intersections 0 Answers
How to detect when an object goes past (so it looks like it touches) a UI element. 1 Answer
Detect Side of Collision 2 Answers