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

Add global_basis property to Node3D #80512

Merged
merged 1 commit into from Aug 18, 2023
Merged

Conversation

mihe
Copy link
Contributor

@mihe mihe commented Aug 11, 2023

Resolves godotengine/godot-proposals#6229.

This adds a global_basis property to Node3D, which is similar to the global_position property in that it's just a shorthand for global_transform.basis.

Useful for things like intersect_ray, since physics queries are all done in global-space.

If nothing else it makes the global_* part of the Node3D API more consistent with the non-global one.

Copy link
Member

@aaronfranke aaronfranke left a comment

Choose a reason for hiding this comment

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

Makes sense to me, and the code looks good.

@akien-mga akien-mga modified the milestones: 4.x, 4.2 Aug 18, 2023
@akien-mga akien-mga merged commit d817674 into godotengine:master Aug 18, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@mihe mihe deleted the global-basis branch August 27, 2023 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include 'global_basis' as Transform3D access property for Node3D class
3 participants