Game Development Community

Moving Sprites In A Circular Motion

by David Taylor · in Torque Game Builder · 04/27/2006 (11:55 am) · 3 replies

I posted this thread here, but still can't get this to work, despite offered help. Can anyone suggest where I'm going wrong?

#1
04/27/2006 (8:13 pm)
I believe as far as the rotating hand goes you may need to do a conversion to change the position from "set world position" to "set scene position" or something of the sort. When you said your sprite was being pushed off into the corner, it was pretty much jumping to that possition, no? That's because it was looking for the world coordinate (that starts in the upper corner 0,0) and not the scene coord (that starts in the center 0,0). I had done something similar last year and that was my problem. I could be wrong.

Edit: Also, in regards to your alternative solution, instead of using an opaque image and setting the alpha all the way down... open up photoshop or some other program and create a blank .png. That way you can have your visible sprite mounted on an invisible object.
#2
04/27/2006 (8:18 pm)
Ah yes, that makes sense, Matt. The suggestion I've used, though, is from the other thread. I've loaded a large transparent image, and have called mount() on the hand, then rotated the large image. It does the trick. ;)
#3
05/01/2006 (9:24 am)
Unless I've misunderstood what's being requested here; a suggestion would be to use a "t2dSceneObject" (rather than a sprite with an invisible image) as the object to mount to, that way you don't need any imagery at all and it has all the core functionality such as mounting etc.

- Melv.