pull liigub õiges suunas

This commit is contained in:
2026-05-09 21:52:11 +03:00
parent 9675ae884d
commit a809ed6cc4
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -6,4 +6,4 @@ extends Camera3D
func _process(delta: float) -> void: func _process(delta: float) -> void:
position = lerp(position, spring_arm.position, delta * lerp_power) position = position.lerp(spring_arm.position, delta * lerp_power)
+1 -1
View File
@@ -6,7 +6,7 @@ extends Node3D
@export var min_zoom: float = 2.0 @export var min_zoom: float = 2.0
@export var max_zoom: float = 12.0 @export var max_zoom: float = 12.0
@onready var spring_arm := $SpringArm3D @onready var spring_arm: SpringArm3D = $SpringArm3D
func _ready() -> void: func _ready() -> void:
+3 -3
View File
@@ -26,9 +26,9 @@ func _physics_process(delta: float) -> void:
velocity.x = direction.x * SPEED velocity.x = direction.x * SPEED
velocity.z = direction.z * SPEED velocity.z = direction.z * SPEED
else: else:
velocity.x = move_toward(velocity.x, 0, SPEED) velocity.x = move_toward(velocity.x, 0.0, SPEED)
velocity.z = move_toward(velocity.z, 0, SPEED) velocity.z = move_toward(velocity.z, 0.0, SPEED)
cube_guy.rotation.y = lerp_angle(cube_guy.rotation.y, camera_pivot.rotation.y, delta * turn_speed) cube_guy.rotation.y = lerp_angle(cube_guy.rotation.y, camera_pivot.rotation.y + PI, delta * turn_speed)
move_and_slide() move_and_slide()