Godot Version
4.3
Question
I’m making a game where the player moves around a camera, and I want its movement to depend on where the camera is facing
This is the movement right now, any idea what could I do to make it depend on the camera rotation?
Usually you can multiply the camera’s basis by the input vector
var input_direction: Vector2 = Input.get_vecotr("left", "right", "forward", "backward")
var direction: Vector3 = $Camera.global_basis.orthonormalized() * Vector3(input_direction.x, 0, input_direction.y)
1 Like