Game Development Community

How to rotate a GUIBitmap

by Trent · in Torque X 3D · 01/13/2010 (11:02 pm) · 3 replies

How do I rotate one of these? I can't see a rotation setting anywhere, just size and position.

#1
01/16/2010 (9:07 am)
It would be nice to be able to do this, but I coded my own work around for now.
#2
01/22/2010 (11:59 pm)
There's isn't support for rotation presently, but that shouldn't be too hard to add. I'll make sure it gets on the development wishlist.

John K.
#3
01/23/2010 (1:47 am)
I thought it would be easy and I tried it, but it turned out harder than I expected. There is a rotation property in DrawUtil.BitmapStretchSR() that is

_workingRenderInstance.ObjectTransform = Matrix.Identity;

I figured changing this would cause it to rotate but instead the bitmap just flies off the screen. I coded my own GUI Bitmap class that uses a sprite batch instead. Had to make a few mods elsewhere but it does what I need.