Launching player foward

Godot Version

4.3

Question

I am trying to launch my player foward in the direction they are looking however ignore the y axis how would i do this

Can you show us your code?

i have a movement script but just want to know how you would do this (prefferably with some exampl code) its just a button and so far i dont have any code yet so i wouldnt know what you want me to show

Without seeing code, most people can only speculate on what the best way would be to do this in your case.

In my game, I simply set the velocity in the direction I want to launch the player in, and that’s it.

1 Like

-basis.z is the direction the node is facing, that might get you started?

1 Like

Yes, and showing us that code would answer things like:

  • Is this 2D or 3D?
  • Are you using system gravity?
  • Are you using delta in your velocity calculations?
  • What is your speed/frame multiplier?