Game Development Community

Changing pivot point

by Apurva Amin · in Torque Game Builder · 07/20/2006 (6:17 pm) · 5 replies

Hi,
I've searched the boards, but the posts seem to be quite old, so an there may have been an update. I was wondering if there's a way of moving the pivot point of a sprite. At the moment, my character is holding a gun, which rotates to point towards the mouse. However, it rotates in the centre which obviously doesn't look right. OT, but is there a way to search just the TGB boards, since a lot of the search results stem from the TGE boards?
Thanks

#1
07/20/2006 (6:31 pm)
In your graphics program, make the canvas larger. Then put the "pivot point" of your image in the center of that larger canvas. Save and use. Now the image will still rotate about the center, but that center will be your "pivot point".

Also, as far as I know, there is still no way to search only the TGB boards. It would be a nice feature, one that I would use often *WINK WINK NUDGE NUDGE*.
#2
07/21/2006 (4:28 pm)
Hmm, I was worried I'd have to do that. Small increases in canvas size is going to accumulate and affect the amount of memory used :(
Thanks for the help.
#3
07/23/2006 (1:03 pm)
Is it really that bad? PNG's are very small, but I suspose if you had many weapons and other objects that you needed the canvas to be enlarged, it could turn out to be a problem.
#4
07/23/2006 (3:59 pm)
In all fairness it's not that bad. Would've preferred it if I could move the rotation point but, from what I've heard, that would mess up the phyics engine. It's not a major problem. Just thought I was missing some simple mount option where I could choose the rotation point.
#5
07/23/2006 (6:00 pm)
Yeah, thats something you'd think TGB would have!