-
-
-func get_new_velocity_from_input(input: InputPacket, delta: float) -> Vector3:
- # Get the XZ input direction based on player's input relative to the camera
- var forward := camera.global_basis.z
- var right := camera.global_basis.x
- var movement_direction := (
- forward * input.movement_direction.y + right * input.movement_direction.x
- ).normalized()
- movement_direction.y = 0
+func get_new_velocity_from_input(input: InputPacket, delta: float, speed: float) -> Vector3:
+ var movement_direction := Vector3(
+ input.player_movement_direction.x,
+ 0,
+ input.player_movement_direction.y
+ )