Lock actors together.
efish
Member Posts: 40
Hey guys!
Does anyone know if it is possible to lock one actor to another? Lets say you have on invisible actor that moves exactly like another visible actor when it is touched. I currently use the "follow" method where I track the others actors position (x) vi an attribute, but this method does have a small lag. Any help is appreciated!
Thanks:)
Does anyone know if it is possible to lock one actor to another? Lets say you have on invisible actor that moves exactly like another visible actor when it is touched. I currently use the "follow" method where I track the others actors position (x) vi an attribute, but this method does have a small lag. Any help is appreciated!
Thanks:)
Comments
Create two variable that track the X and Y of the actor you're locking onto (locking actor).
When "invisible actor" collides or overlaps with "locking actor", constrain "invisible actors" X and Y coordinates to "locking actor's X" + ("locking actor's" X - "invisible actor's" X) and "locking actor's" Y + ("locking actor's" Y - "invisible actor's" Y).
Basically, I'm taking the difference in location between the two actors, and using them as offsets when constraining the invisible actor's location to the locking actor's location. Kinda, maybe make sense?
Now create a rule and you will see "current scene" as an option in the drop down of the rule. Select layers and listed in each layer is every other actor on the scene.