Generating colliders on shadows

Hey, i have a question regarding shadows. Me and my team have plans to make a game where you control a shadow, and have to navigate on other shadows, kind of like this game Lost in Shadow: https://youtu.be/UfNZGQnTi68?t=454

We want to use realtime lighting where the shadows can be bent and transformed in just about anyway since the player is the one controlling the light.

My question is, is it possible to make it so shadows automatically generate colliders so that a 2D gameobject can move upon them?

When i did some research i noticed that when a light is cast, it uses Rays to where its inner and outer core of the light is, could it be possible to tap into these rays and maybe genereate colliders to where a ray hits a plane?

Thanks in advance // Alex

If you can assume directional light.(sun/moon) Then you just take shadow caster triangles and project them to plane. Then you create physic colliders from those triangles. This will need someone with good math and c++ skills. You probably need to simplify shadow casting objects a bit to make it fast enough. If you need more help I can try to help.

Thank you for your reply, will look up Shadow caster Triangles :slight_smile: