Constrain to position in a rotating actor
GreenfroggGames
Member Posts: 224
Can somebody please help me understand this formula. I've constrained the position and rotation of my "head" actor to my "player" actor and it works.
Now if I want to change the constrained position of the "head" actor, I don't really know what to type in??
The "head" actor is 5050, the "player" actor is 128128
Comments
The ’36’ is the distance from the centre of PL 1 in pixels.
The '-220’ is the angle between the actor and PL 1 in degrees.
(-220° is a bit of a weird way of saying 140°, but acceptable nonetheless).
This might help you better understand how the numbers work:
http://forums.gamesalad.com/discussion/62202/linkmachine/p1
While this is a more straightforward version of the same project:
http://forums.gamesalad.com/discussion/75220/fast-constrain-linkmachine-v2/p1
Thanks @Socks
Here's a quick sketch . .
Red boxes are the bounding boxes of the actors, the small red squares are the centre points.
The angle between the two actors is 54°.
And the distance between the two centre points (the 'magnitude') is 217 pixels.
@Socks Awesome and very helpful