How to make player actor follow the mouse (player movement controlled with mouse

Kastex

  • Posts: 42
the player will use the mouse to move around and the actor will follow the mouse precisely. i want to be able to set the speed so that there is a maximum speed that the actor will follow the mouse. any help please?

JeffreyDriver

  • Posts: 1868
Do you want to follow the path the mouse makes, or just move towards the mouse?
Current Projects:
Horror Point & Click Episode 1.
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

Kastex

  • Posts: 42
moving towards the mouse.

JeffreyDriver

  • Posts: 1868
ACTORS > MOTION > SPEED

There's a block to set the velocity in degrees.  You can use that to push the actor towards the mouse. If you don't want to calculate the degrees yourself, install the Easy math extension. You can set the velocity to whatever you like.

If you want variable speed, for example based upon the distance between the actor and the mouse, the Easy Math extension also has a block for that.
Current Projects:
Horror Point & Click Episode 1.
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk