Hi all,
I'm trying to make a simple top down game where the player is followed by baddies. The way the player moves is by dragging the mouse across the screen, and the character follows the mouse nearly 1:1.
I need the baddies to move at the same speed the player is moving. So if you move the mouse quickly the baddies will also speed up to match the player speed. The thing is - I can't find a way of measuring the player speed.
I'm using
Mouse Pick and
Move Towards to move the player to where the mouse is, and I've tried
Get Speed and
Get Velocity (with a rigidbody on) to measure the speed every frame and have that float variable control the speed of the baddies. But all I'm getting is a weird number on the Y axis (goes from -7 to -9) that has no relation to the way the player moves.
Help?