Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to get an actor to accelerate towards another actor and still be able to move

stan_mcginnisstan_mcginnis Posts: 18Member, BASIC
edited June 2018 in Working with GS (Mac)

In my game, the player is supposed to be pulled towards another actor, like a black hole. I stored the black hole's position in two game variables and told my actor to accelerate to that position. However, I have one problem. In game, when I move the player in any direction using the arrow keys (There is no gravity), even just 1 pixel, the acceleration suddenly stops and does not start again until I let go of the key. Once I let go of the key, the acceleration starts again from a speed of 0. I want my movement speed to be added on to my acceleration speed so the player can fight against the acceleration or move with it and go faster.

Best Answer

Sign In or Register to comment.