set orientation or just me
BlitzMax Forums/BlitzMax Beginners Area/set orientation or just me| 
 | ||
| im rendering an image for the center and rotate it. i can not seem to reorientate it from the center. Function render(ships:ship) Local imgs:TImage = ships.img Local xs = ships.x Local ys = ships.y SetRotation(ships.ang) SetOrigin(Cos(ships.ang)*-32, Sin(ships.ang)*-32) DrawImage(ships.img, ships.x,ships.y, 0) SetRotation(0) SetOrigin(0,0) End Function | 
| 
 | ||
| It's been a while since I dealt with this, but IIRC it's SetImageHandle: Function SetImageHandle( image:TImage,x#,y# ) Description Set an image's handle to an arbitrary point Information An image's handle is subtracted from the coordinates of DrawImage before rotation and scale are applied. | 
| 
 | ||
| MidHandleImage(image:TImage) will automatically set the handle to the center of the image. |