How do I make a drop shadow in a different direction?
I'm making a shooter where you fly around the X/Y axis in a ship and obstacles are flying at you on the Z axis. In testing I noticed it's hard to judge the depth of the things coming at you so I wanted to project a shadow of the ship on the buildings so you know your positioning relative to the buildings. There is already an option for this in the controller sensor called "Platforming Shadow", however this shadow only faces downwards and you cannot change the direction it projects onto. Here are some things I've tried:
1. Placing a light in front of the ship. This projects an image, however since the lights only project an angle, the lights grow and shrink in size depending on the distance of the obstacles which didn't look nice.
2. Placing a light behind the ship. This gave me more control of the size of the projection and the shape of the ship, however I...
a. Had the same issue with the light/shadow growing/shrinking in size.
b. The light hits the ship making it super bright and blinding. This could be solved if Mm had an option on the light to only cast shadows on certain tagged/labelled objects.
3. Place a moving artificial shadow onto the incoming obstacles using the laser pointer, tags, a piston, and a bunch of movers. Two problems with this:
a. Couldn't get the laser pointer "hit distance" output to work with the "connector position" input of the piston. I suspect this is because the input might be looking for a percentage and I'm not experienced enough yet to convert the values.
b. It's very complicated and messy. Requires a lot of logic and tinkering for such a simple effect.
The last thing I could try (and might end up doing) is simply rotating the whole level so it faces downwards. That way I could simply turn on the "Platforming Shadow" and it'd give the the effect I wanted (since the Z axis would be replaced with the downward Y axis that the shadow is applied to). I want to avoid this in case I want to include some physics objects in the level that obey gravity.
Let me know if y'all have any ideas. If any Mm devs are reading this, it'd be nice if we could edit the direction of the "Platforming Shadow" to avoid huge level reworks like this.
-
I guess if you need multiple drop shadows you could use the sun as a second drop shadow. It is an infinite distance away from the player so the shadow would be the same size as the object casting the shadow.
The other thing you could do is to use laser pointers projecting from your ship and then moving small point lights or UI elements to their hit position to communicate the ships position.
Might not look as neat but you will be able to have more at once. You can only have 1 sun and 1 drop shadow so 2 max with the other solution.
Hope this is helpful :) Peter
Iniciar sesión para dejar un comentario.