|
@ -3,8 +3,8 @@ extends CharacterBody3D |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@export var jump_velocity: float = 4.5 |
|
|
@export var jump_velocity: float = 4.5 |
|
|
@export var mouse_sensitivity_horizontal: float = 0.003 |
|
|
|
|
|
@export var mouse_sensitivity_vertical: float = 0.003 |
|
|
|
|
|
|
|
|
@export var mouse_sensitivity_horizontal: float = 0.002 |
|
|
|
|
|
@export var mouse_sensitivity_vertical: float = 0.002 |
|
|
@export var speed: float = 5.0 |
|
|
@export var speed: float = 5.0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -28,7 +28,8 @@ func apply_gravity(delta: float) -> void: |
|
|
velocity += get_gravity() * delta |
|
|
velocity += get_gravity() * delta |
|
|
|
|
|
|
|
|
func handle_jump() -> void: |
|
|
func handle_jump() -> void: |
|
|
if not Input.is_action_just_pressed("jump") or not is_on_floor(): return |
|
|
|
|
|
|
|
|
if not Input.is_action_just_pressed("jump"): return |
|
|
|
|
|
if not is_on_floor(): return |
|
|
velocity.y = jump_velocity |
|
|
velocity.y = jump_velocity |
|
|
|
|
|
|
|
|
func handle_mouse_movement(event: InputEvent) -> void: |
|
|
func handle_mouse_movement(event: InputEvent) -> void: |
|
|