# How can an actor follow an another actor moving in circle?

Member Posts: 158

I have two actors A and B
A is moving in circle How can B follow A.
like A is parent and B is child.

• London, UK.Member Posts: 12,822

Constrain the X and Y positions of B to the X and Y positions of A.

• Member Posts: 158

@Socks said:
Constrain the X and Y positions of B to the X and Y positions of A.

What i exactly want was B should follow A like a train compartment.
I mean B will be below A in position, And B will be following A in circle.
Hope you understand my problem.

• London, UK.Member Posts: 12,822

@Simple Apps said:
Hope you understand my problem.

Yes ! I understand better now, let me make you a demo . . . back in a couple of minutes . . .

• London, UK.Member Posts: 12,822

Demo attached . . . .

• Member Posts: 158

@Socks said:
Demo attached . . . .

Thank You very much.

• London, UK.Member Posts: 12,822

@Simple Apps

300*cos(( game.Time *55)-20)+512

300 = radius of the circle

55 = speed

-20 = angle offset

512 = centre position of circle

• Member Posts: 158

@Socks said:
Demo attached . . . .

Hi Socks
Thanks for your demo but unfortunately
Your Demo did not solved my complete problem.
What I did was
I made A to (move) in direction X
and when (key right) is down i made A to (rotate in clock wise)
and when (key Left) is down i made A to rotate in (Anticlock wise)
So when right key is pressed A will rotate in circle in clock wise fashion and
when left key is pressed A will rotate in circle in Anti clock wise fashion.

And i took another actor B to follow A , this is not working for me.
I constrained B to A but its not working