Stop following when acceleration is '0'
lowski
Member Posts: 25
Hello.
How can I have an actor follow another actor (wait keep reading!) but when the player controlled actor's acceleration stops the actor following also stops? The problem is when my player controlled actor is running against a barrier the actor that is following continues to follow and will eventually go off the screen. I need to make it so that the speed variable of my player actor is tied to my following actor so when the player does get stuck running up against an immovable barrier, my following actor won't go whizzing past him off the screen.
I know there is an easy solution and I know it's staring me right in the face but for the life of me I can't seem to figure it out -_-
How can I have an actor follow another actor (wait keep reading!) but when the player controlled actor's acceleration stops the actor following also stops? The problem is when my player controlled actor is running against a barrier the actor that is following continues to follow and will eventually go off the screen. I need to make it so that the speed variable of my player actor is tied to my following actor so when the player does get stuck running up against an immovable barrier, my following actor won't go whizzing past him off the screen.
I know there is an easy solution and I know it's staring me right in the face but for the life of me I can't seem to figure it out -_-
Comments