5 func update(input: InputPacket, _delta: float):
6 # Get the XZ input direction based on player's input relative to the camera
7 var forward := camera.global_basis.z
8 var right := camera.global_basis.x
9 var move_direction := (
10 forward * input.movement_direction.y + right * input.movement_direction.x
14 # TODO: check if new_pos is valid!
15 var new_pos := player.last_movement_direction * player.dash_length
16 player.global_position += new_pos