Game Development Community

is sprites position relative to itself always dead center?

by rennie moffat · in Torque Game Builder · 05/27/2010 (8:40 am) · 5 replies

is there a way to adjust the players position relative to itself? In other words make the players position be called from another point in the sprite other than dead center?


About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.


#1
05/27/2010 (9:25 am)
I'm quite sure that a sprite's position is set using the top left corner of the sprite.

Am I misunderstanding the question?
#2
05/27/2010 (9:53 am)
oh really? I always thought it was dead center. ANyhow, it is not a big deal, but if I could set it to any offset I wanted, easily, in the editor, that would be a neat, handy feature. Sort point. What is that exactly? I thought that might be it, but it is not. ANyhow, no worries either way. And no you did not misunderstand the question.



Cheers.


#3
05/27/2010 (2:09 pm)
Rotation is called from the middle point.

If you're setting a position, you can always + or - whatever offset you want.
#4
05/27/2010 (3:46 pm)
true yes, I know, it was not that big a deal.

thanks.
#5
05/28/2010 (12:03 am)
Another method is to mount one object onto another using the offset you require. Then you can position the parent objects' center and also rotate around that point.