Problem with Rotate and Constrain behaviours
Hi everyone, I'm getting a problem when I try to constrain an actor to another that is rotating 36o around a centre pivot. Actor 1 (spins 360) is a horizontal line, actor 2 is a smaller vertical line that cuts through actor 1 at the left side. Imagine a crucifix lying on its side. I need actor 1 to rotate 360 while actor 2 stays with it as if it where nailed on. Sorry if this is hard to imagine, I should hopefully have a pic soon. I tried using a simple rotate behaviour on actor 1, and a constrain behaviour on actor 2 to actor 1s x and y. actor 1 pivots 360 but 2 doesn't follow. Any suggestions would be greatly appreciated.
Thanks
Best Answer
-
Socks London, UK.Posts: 12,822
@irvaz said:
Try this:
https://forums.gamesalad.com/discussion/62202/linkmachine/p1
. . . . . .
Or constrain actor 2 to:
X position . . . 250 *cos(actor1's rotation+180)+actor1's X position
Y position . . . 250 *sin(actor1's rotation+180)+actor1's Y position(Change the value of 250 to whatever you need, but keep the two values the same)