Godot Version
4.7
Question
im trying to add camera character movement independent of the camera, so that the character can rotate away from the camera, in a sense like rdr2 or bloodborne, however, I want to apply velocity to the characterBody3D using velocity.x = speed delta OR velocity*.z **= speed * delta, but it does this globaly instead of applying the velocity in the direction the character is facing, and when i try to just use velocity by itself it errors, is there anyway to remedy this or nah?
if Input.is_action_pressed("w"):
velocity.z += -delta * speed
global_rotation.y = pivot.global_rotation.y
if Input.is_action_pressed("s"):
velocity.z += -delta * speed
global_rotation.y = deg_to_rad(pivot.global_rotation.y - 180)
if Input.is_action_pressed("a"):
velocity.x += delta * speed
global_rotation.y = deg_to_rad(pivot.global_rotation.y + 90)
if Input.is_action_pressed("d"):
velocity.x += -delta * speed
global_rotation.y = deg_to_rad(pivot.global_rotation.y - 90)