pull liigub õiges suunas
This commit is contained in:
+1
-1
@@ -6,4 +6,4 @@ extends Camera3D
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
position = lerp(position, spring_arm.position, delta * lerp_power)
|
||||
position = position.lerp(spring_arm.position, delta * lerp_power)
|
||||
|
||||
@@ -6,7 +6,7 @@ extends Node3D
|
||||
@export var min_zoom: float = 2.0
|
||||
@export var max_zoom: float = 12.0
|
||||
|
||||
@onready var spring_arm := $SpringArm3D
|
||||
@onready var spring_arm: SpringArm3D = $SpringArm3D
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
|
||||
@@ -26,9 +26,9 @@ func _physics_process(delta: float) -> void:
|
||||
velocity.x = direction.x * SPEED
|
||||
velocity.z = direction.z * SPEED
|
||||
else:
|
||||
velocity.x = move_toward(velocity.x, 0, SPEED)
|
||||
velocity.z = move_toward(velocity.z, 0, SPEED)
|
||||
velocity.x = move_toward(velocity.x, 0.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()
|
||||
|
||||
Reference in New Issue
Block a user