NEON-25: gdformat isometric_follow_camera.gd
parent
387b61b577
commit
9f6297c46d
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue