Codesnippets > 2D-snippets

Rotate and translate (and scale) any group of GLBasic 2D commands

<< < (2/2)

bigsofty:
Yes that should be fine. Collisions should still work without. Just visualise that the ship is rotating and the rest of the level is not. So no need to rotate X & Y. I'd personally go with some sort of circle to circle collision, for the player to baddies but AABB should still work too but dont expect pixel accuracy(AABB around a rotated sprite will no be great).


erico:
Nice, it is just that I get a general idea about it, will play around with the code soon. :good:

bigsofty:
Updated, added scaling too.

See first post.

P.S. I think to have full flexibility, the best thing to do would be to make the Scaling, Translation and Rotation different commands, this would allow them to be called in a different order, making things more flexible. So I added these extra commands too, drop me a line if you are having trouble with them.

Navigation

[0] Message Index

[*] Previous page

Go to full version