@monopalle wrote:
Hey gang...
I am doing simple shadow-casting using simple 'vector-position-color' polygons....
The idea is having a few vertices at the base of the shadow-casting sprite, and moving the other few vertices around (based on the lights source) to create dynamic shadow... Simple stuff....
Now, when I draw these vertices, the coordinates I assign them have (0,0) as the CENTER of the screen, and a value of 1 represents the furthest edges of the screen.... So its like we are talking ratios from the center of the screen, rather than game units, or pixels from the top left.
The problem is slightly compounded by the fact that my game scrolls....
Should I just do a little calculation to get a screen ratio from my object coordinates?
Or is there a view-matrix trick I can do, to align these 2 coordinate systems?....
Posts: 1
Participants: 1