Added player movement

This commit is contained in:
2024-01-26 17:14:20 +01:00
parent 2cd93f2a39
commit 8370afd9a1
12 changed files with 148 additions and 23 deletions

View File

@ -11,11 +11,12 @@ const DECELERATE := 0.75
var direction: Vector3
var angle: float
var gravity: float = ProjectSettings.get_setting("physics/3d/default_gravity")
var controller: Node
func _process(delta):
if direction:
if direction != Vector3.ZERO:
angle = atan2(direction.x, direction.z)
model.rotation.y = lerp_angle(model.rotation.y, angle, rotation_speed * delta)
func _physics_process(delta):