Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect return type cast #269

Merged
merged 1 commit into from
Apr 28, 2024
Merged

Fix incorrect return type cast #269

merged 1 commit into from
Apr 28, 2024

Conversation

audeck
Copy link
Contributor

@audeck audeck commented Apr 28, 2024

Currently, _set_limit_clamp_position() returns a Vector2i when a limit target is applied, resulting in target_position always being truncated to an integer. This, without any follow_damping, results in the truncated target_position propagating to the camera's global_position on line 577, possibly causing misalignment between the camera and the node it's following, which can be at float x and y values.

This pr simply changes the return type to Vector2, leaving any logic intact.

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.

As per #268, looks good to me!

@ramokz ramokz merged commit 2e64672 into ramokz:main Apr 28, 2024
@ramokz
Copy link
Owner

ramokz commented Apr 28, 2024

Thanks for spotting and updating this ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants