Added player movement
This commit is contained in:
@ -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):
|
||||
|
Reference in New Issue
Block a user