**Help Constraining Actors**
Hi I wanted to know how exactly do I constrain the position of a actor by using the position of another constantly moving actor thanks!
Best Answer
-
gyroscope I am here.Posts: 6,598
Hi @Mikv616
I'll answer with an example: constantly moving actor's starting x,y is 200,150, and the actor to follow is 300,100, let's say.
use 2 Constrain Behaviours as follows:
Constrain Attribute FollowActor.Position.x to MovingActor.Position.x + 100
Constrain Attribute FollowActor.Position.y to MovingActor.Position.x -50
If you wanted it to follow exactly, then don't put any offsets.
Hope that helps.
Answers
Yes, the +100 and -50 as examples are the offsets; the position.X and position.Y for both actors – leading and following – are already there in their attributes, you don't have to make them.
I responded to your PM about this too, hope you get it worked out.
Jamie