NEON-25: gdformat isometric_follow_camera.gd

pull/31/head
VinPropane 2026-04-08 00:08:00 -04:00
parent 387b61b577
commit 9f6297c46d
1 changed files with 6 additions and 8 deletions

View File

@ -74,9 +74,7 @@ func _process(delta: float) -> void:
if not allow_yaw:
_orbit_yaw_rad = 0.0
else:
_orbit_yaw_rad = clampf(
_orbit_yaw_rad, -deg_to_rad(max_yaw_deg), deg_to_rad(max_yaw_deg)
)
_orbit_yaw_rad = clampf(_orbit_yaw_rad, -deg_to_rad(max_yaw_deg), deg_to_rad(max_yaw_deg))
var focus: Vector3 = target.global_position + Vector3(0.0, focus_vertical_offset, 0.0)
var yaw_total: float = deg_to_rad(presentation_yaw_deg) + _orbit_yaw_rad
@ -119,8 +117,10 @@ func _warn_missing_follow_target_once() -> void:
return
_warned_missing_follow_target = true
push_warning(
"IsometricFollowCamera: follow_target_path is empty or does not resolve to a Node3D; "
+ "camera not updating."
(
"IsometricFollowCamera: follow_target_path is empty or does not resolve to a Node3D; "
+ "camera not updating."
)
)
@ -128,6 +128,4 @@ static func desired_eye_world(
focus: Vector3, distance: float, pitch_elevation_rad: float, yaw_rad: float
) -> Vector3:
var h: float = distance * cos(pitch_elevation_rad)
return focus + Vector3(
h * sin(yaw_rad), distance * sin(pitch_elevation_rad), h * cos(yaw_rad)
)
return focus + Vector3(h * sin(yaw_rad), distance * sin(pitch_elevation_rad), h * cos(yaw_rad))