![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | ProbablyIdiot |
So, I’ve been trying to make a top-down maze game where you navigate the maze by using the recoil from shooting a gun. I have watched some youtube videos, and have worked out how I’m going to calculate the movement:
- Find the vector between the player’s current position and the mouse cursor
- Multiply the above vector by -1
- Set the player’s velocity to (0,0)
- Add the vector to the player’s velocity
Please can someone explain how to do step 1 (in gdscript)? I am relatively new to Godot and only have a partial understanding of vector maths, any help would be appreciated.
Thanks in Advance.