Rotate player

This commit is contained in:
2026-06-11 20:11:32 -05:00
parent eec429147b
commit 619bf09ab9
4 changed files with 12 additions and 2 deletions
+4
View File
@@ -48,6 +48,8 @@ func _applyPlayerMovement(_delta:float):
if directionAdjusted.length() <= 0.01:
return
entity.look_at(entity.global_position + directionAdjusted, Vector3.UP)
var speed = walkSpeed
entity.velocity.x = directionAdjusted.x * speed
entity.velocity.z = directionAdjusted.z * speed
@@ -64,6 +66,8 @@ func _applyFriction(delta:float) -> void:
entity.velocity.z *= delta * FRICTION
func _canMove() -> bool:
if UI.dialogueActive:
return false
if !UI.TEXTBOX.isClosed:
return false
return true