seiko
11-25-2005, 07:22 AM
I'm creating an over head 2d scroller and use quads to represent buildings. I want to now simulate a buildings shadow cast by using anothr quad. This quad will simply be alpha blended to the scene. Question is how can I calculate the shadow quad so it is rotated and sized correctly dependant on the lights position, quads position and height. Obviously the 2d quad doesn't have a height but I can add the variable from else where as this will be determined by artistic flare ;)
As it's 2d albeit using a 3d engine I'm hoping that I can call upon some basic trig and just to be clear I'm not after a super precise shadow with soft edges etc. I just want the shadow to flare out from the buildings base at the correct angles so it won't be enough just to rotate the original quad.
Many thanks
As it's 2d albeit using a 3d engine I'm hoping that I can call upon some basic trig and just to be clear I'm not after a super precise shadow with soft edges etc. I just want the shadow to flare out from the buildings base at the correct angles so it won't be enough just to rotate the original quad.
Many thanks