thanks for reading my post. I am using box2d lights, and it is mostly working good, except for 1 problem. When A conelight goes ontop of a body that light collides with, the light passes over the object. I want to make it so that if the conelight collides with a body, it doesn't pass over the object, but instead not render. Thanks again!
Asked
Active
Viewed 139 times
2 Answers
0
Box2dLights uses RayCasting to check if some object has to drop a shadow. As this raycasts ignore shapes on their starting point, the object right under your light will never drop a shadow. Instead you have to query the world yourself and switch your light off, if there is a shape on that point.

Sebastian
- 5,721
- 3
- 43
- 69