Constrain actor to make it move with you?

Can someone please tell me how I can make one actor follow another? I remember I did this once but I forgot the coding. All I remember is making 2 real attributes calling them real x & real y & the then constrain something.. that's the part I forgot. Thanks :)

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    Is your actor rotating ?

    Are the two actors in the same position ?

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    Create 2 real attributes. Name them actors and actorY. Inside the main actor, constrain gameX to self.position.X. Do the same for Y.

    Then in your follow actor, constrain self X to game.ActorX. Do the same for Y.

Sign In or Register to comment.