better explainer wrote:Actor B follows actor A by the same route than actor A has just use.
better explainer wrote:Actor B follows actor A by the same route than actor A has just use.
novice wrote:You can do this by making the main actor create point actors on a timer, and then use a move to funct. to the last point actor and when it reaches that positions it destroys that point and so on.Also you could make it create another point actor each time a significant change in angle is made so actor B wouldnt cut across corners. Does this make any sense?
B-> P1..........P2...........P3.......P4........A->
three finger pete wrote:what I would do is every draw, the actor in the lead emits his X and Y locations to a global array. Then each draw, the following actor looks that location up, and heads to it.
Thats assuming that every actor might be followed.
In the case of one actor always leading and one always following, just have the lead actor send his X and Y direct to the follower.
Put something like this in the leaders script.
FollowerXdest = x;
FollowerYdest = y;
then inside the followers script, you get follower to moveto(FollowerXdest,FollowerYdest)
Users browsing this forum: No registered users and 1 guest