asset vibe

This commit is contained in:
Marek Lenczewski
2026-04-16 18:02:03 +02:00
parent f21e30eb55
commit 4b0f82c1de
28 changed files with 713 additions and 60 deletions

View File

@@ -25,6 +25,11 @@ func _physics_process(delta: float) -> void:
if direction:
player.velocity.x = direction.x * PlayerData.speed
player.velocity.z = direction.z * PlayerData.speed
var world_yaw: float = atan2(-direction.x, -direction.z)
var local_yaw: float = world_yaw - player.rotation.y
var mesh: Node3D = player.get_node_or_null("Mesh") as Node3D
if mesh:
mesh.rotation.y = lerp_angle(mesh.rotation.y, local_yaw, 10.0 * delta)
else:
player.velocity.x = move_toward(player.velocity.x, 0, PlayerData.speed)
player.velocity.z = move_toward(player.velocity.z, 0, PlayerData.speed)