Issue with Character Movement on the Negative Z-Axis in Godot 4.2

Godot Version

Question

Hello everyone,

I’m currently working on a movement controller for my character in Godot 4.2 and I’m encountering an issue with the character’s movement on the negative z-axis. The character moves according to the camera direction and the mesh is correctly rotated when moving on the x-axis and the positive z-axis. However, when I try to move the character on the negative z-axis, the movement is not working as expected.

Here’s a detailed breakdown of the issue:

X-Axis Movement: The character moves correctly according to the camera direction and the mesh rotates properly.
Positive Z-Axis Movement: The character moves correctly in the positive z direction.
Negative Z-Axis Movement: The character doesn’t move correctly in the negative z direction.

You’re using Euler angles for movement, which is asking for trouble. Use the basis axes for movement.

velocity = transform.basis.z * delta * whatever_modifiers, and get rid of your Euler angle code.

1 Like

thanks for the help!