- Home /
Physics Overlap Sphere issue
Hi, I am trying to implement a sensor sort of function which does not involve colliders. Reason: I am building this plane that wants to senses bullets flying towards him. If i use colliders, the bullets will impact onto the sensor instead.
I found out about Physics.OverlapSphere and have been trying it. However, it doesnt detect anything but the 'plane'. I did not use any layer mask.
When I tried to remove the collider on the plane(remove component), i get this error! MissingComponentExeception: There is no 'collider' attached to the 'Enemy Plane' game object, but a script is trying to access it.
What gives? Does Physics.OverlapSphere require its own collider? why cant I sense other things than my own collider?
Physics.OverlapSphere
returns an array of all colliders that are inside that sphere. That means that it won't "sense" anything that doesn't have a collider.
Your answer
Follow this Question
Related Questions
OverlapSphere is really confusing 0 Answers
How is OverlapSphere used? 2 Answers
Detecting mesh collisions after the fact (overlap)? 2 Answers
Physics.SphereCastAll with triggers 1 Answer