spotlights spot angle

I’m trying to get whether or not my character is hit by a spotlight in my scene. I have my position relative to the light and used Vector3.angle and compared that against the spotlight’s spot angle but the angles don’t seem to align. The Vector3.angle returns that I am within the spotlight’s angle while I am outside the light’s actual range. How do I align the angles?

Oh and disable or remove the "Mesh Renderer".

Here is a much lower poly Cone model for you, better performance at the cost of a little accuracy.[33742-low_poly_cone.zip|33742]

1 Answer

1

Here is a Cone 3D model. Unzip it. Import it into Unity. Set it up with a Convex mesh Trigger. Now use an OnTriggerEnter() script on the Cone object.

Thank you so much for this :)