Skip to content

Conversation

@TranquilMarmot
Copy link
Contributor

Fixes #553

@ramokz ramokz added this to the 0.11 milestone Jan 19, 2026
Copy link
Owner

@ramokz ramokz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, couldn't spot any issues when testing beyond these.

_camera_target.global_position = _follow_target_output_position
_transform_output.origin = global_position

if _is_third_person_follow:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to retain this conditional checker, as it would otherwise apply the rotation to all other follow modes as well, which breaks their behavior.

var target_basis: Basis = Basis(target_quat)
_transform_output.basis = target_basis
global_basis = target_basis
elif is_instance_valid(_follow_spring_arm):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be using the _has_follow_spring_arm boolean instead. The instance validator here will cause scene tree errors as the spring arm node is added temporarily and then reparented, which Godot doesn't like. Nothing that causes a crash, but it does trigger a couple of needless error logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Third-person follow now rotates along the Z axis of the object it's following

2 participants