Help with rotations

2 views
Skip to first unread message

MrChaz

unread,
Jan 13, 2010, 5:22:32 AM1/13/10
to Rokon
Hi all,

I'm having trouble wrapping my brain around how to do 2 rotations on a
sprite. What I want to be able to do is rotate the sprite about it's
origin (which is fine) but then I want to rotate it about another
point.
In this particular case I have a sprite that I want to be attached to
another sprite which is rotated. At the moment the pseudo code looks
a bit like this

translate to origin
rotate
translate to difference between our sprites location and 'anchor'
sprite location
rotate
translate to position

This, however isn't working as I hoped. Any suggestions?

-MrChaz

Richard Taylor

unread,
Jan 13, 2010, 5:32:24 AM1/13/10
to rokon-...@googlegroups.com
Hi,

Not sure if that's possible to do both things right now, as far as I remember (Ben/Jeremy reworked rotation stuff not long ago) it's either pivotal or central.

I am working on a rewrite of Sprite soon, I'll bear this in mind.



You might want to make the changes yourself to the engine if you need it





Richard

Stephen Charman

unread,
Jan 14, 2010, 4:50:22 AM1/14/10
to rokon-...@googlegroups.com
Turns out I was making life overly complicated - the pivots system will work just fine.

Ben Davis

unread,
Jan 14, 2010, 12:36:45 PM1/14/10
to rokon-...@googlegroups.com
Sorry for chiming in late here -- yes, the rotation pivot should be what you need.

Richard Leggett

unread,
Jan 15, 2010, 8:45:47 AM1/15/10
to rokon-...@googlegroups.com

Stephen Charman

unread,
Jan 15, 2010, 11:27:28 AM1/15/10
to rokon-...@googlegroups.com
That all looks pretty sensible and stuff (I think) that rokon is doing already.

On Fri, Jan 15, 2010 at 1:45 PM, Richard Leggett <richard...@gmail.com> wrote:
Link here:

http://groups.google.com/group/android-developers/msg/6bff807612c4fbaf


Richard Taylor

unread,
Jan 15, 2010, 12:13:00 PM1/15/10
to rokon-...@googlegroups.com
Yeah, I dont really think there is anything there that we aren't already doing - or wouldnt make any difference.

But, good to know anyway :)

MrChaz

unread,
Jan 26, 2010, 3:50:08 PM1/26/10
to Rokon
Figured this out to go in here:

http://groups.google.com/group/android-developers/browse_thread/thread/57afe5120c24c371

looks like Droid likes depth_24 which is a pain because the Galaxy
likes depth_16...

Reply all
Reply to author
Forward
0 new messages