Game Development Community

Flipping Sprites

by Jonathon Stevens · in Torque X 2D · 01/11/2007 (7:41 pm) · 3 replies

Is it possible to flip a sprite in code? I don't want to rotate it, I want to flip it


To explain completely what I mean, if you look at the tankbuster plane, rotating it 180 degress would put it upside down. Flipping it would have the nose pointing to the right, but it wouldn't be upside down.

Are we able to do this in code?

About the author

With a few casual games under his belt as CEO of Last Straw Productions, Jonathon created the increasingly popular Indie MMO Game Developers Conference.


#1
01/12/2007 (1:17 am)
T2DSceneObject.FlipX = true; should get you there! (or maybe it's FlipY, can't remember if it means flip "around" the x axis, or flip in the x "direction", try both...)

#2
01/12/2007 (7:31 am)
FlipX did the trick (it's flip along the axis).

Don't know how the hell I missed that when it was right in front of my eyes (ug).

Thanks!

#3
01/13/2007 (8:22 pm)
You missed it due to "Programmer Goggles" which I imagine to be something like "Beer Goggles" (only without the beer and lack of social discretion). I've had the programmer goggles on a few times, mostly caused by lack of sleep ;)