-func _get_velocity_by_input(input_pkt: InputPacket, delta: float) -> Vector3:
- var new_velocity: Vector3 = velocity
-
- if is_on_floor():
- var move_dir := _get_player_move_direction(input_pkt.movement_direction)
-
- # if we're not stuck, then it's okay to set the velocity
- _floor_normal = get_floor_normal()
- _ground_slope_input = (PI / 2) - new_velocity.angle_to(_floor_normal)
- new_velocity = new_velocity.move_toward(
- move_dir * (_player_speed + _ground_slope_input * _player_speed),
- acceleration * delta
- )
- else:
- new_velocity += get_gravity() * air_speed * delta
-
- return new_velocity
-
-#########
-# actions
-#########
-
-func _player_dash():
- if _last_movement_direction != Vector3.ZERO:
- var dash_local_pos = _last_movement_direction * dash_length
- # TODO: check if valid position, crop the vector to last valid position
- global_position += dash_local_pos
+func _physics_process(delta: float) -> void:
+ var input_pkt := input.get_player_input()
+ model.update(input_pkt, delta)