How to rotate object that maintain their distance.
I've been struggling with angles and offsets tonight, and can't get this to work:
How do you have an control-object that 2 (or more) object match the position(with offsets) and angle to the control object?

(The object with circle is the control-object and the dotted lines illustrates constraints with position and angle info)
How do you have an control-object that 2 (or more) object match the position(with offsets) and angle to the control object?

(The object with circle is the control-object and the dotted lines illustrates constraints with position and angle info)
Comments
This is what I got so far:
self.Position.X game.box-X + 96*sin(game.boxRot)
self.Position.Y game.box-y + 16*cos(game.boxRot)
self.Rotation game.BoxRot +90
But I can't position the box in the Y direction, the offset doesn't work.
See any problems with the code? (I know my match skills suck:) )
you also might need to put a offset inside the (gmae.boxrot)
What kid of offset would I need in the rotation?
The whole thread is here, maybe you can get some ideas and if you find the answer please let us know!
http://gamesalad.com/forums/topic.php?id=20367