Rotation of two objects in relation
Posted
by DMan
on Stack Overflow
See other posts from Stack Overflow
or by DMan
Published on 2010-04-02T17:06:56Z
Indexed on
2010/04/02
18:33 UTC
Read the original article
Hit count: 289
I've got a two sprites- I'll say I have a swing and a person. The swing 'swings' back and forth as I passed a rotation variable into spriteBatch.Draw(). Now I want my person to 'sit' on the swing, and am not sure of how to approach it. Since I want a relative to the swing sprite, I tried personPos=swingPos, but that obviously doesn't work as the swing's position is always the same (it's anchored to a point and swings from there). How would I make the person sprite follow the swinging part of the swing sprite, if that makes any sense?
© Stack Overflow or respective owner