-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Clarify relationship between basis
and transform
properties of Node3D
#80254
Clarify relationship between basis
and transform
properties of Node3D
#80254
Conversation
Node3D.basis
Node3D.basis
basis
and transform
properties of Node3D
The Transform3D can be in more global space (it's not global to the root if it is outside the tree.) or can be in local space. The global transform calculation does caching because the ordinary use requires going through all the parent Node3D global_transforms, getting their transforms and then concatenating them. The 3x4 Transform3D matrix has an Vector3 origin and a 3x3 basis matrix. |
Thanks for the extra explanation on caching. The doubt I had was: if Lines 295 to 298 in cc6a609
Found this code, so it's the non-global one. @YuriSizov I applied the suggested change and force-pushed. |
eb66864
to
07fd89b
Compare
Sorry, I should've mentioned it from the getgo, but can you please amend your commit message. It doesn't really follow our preferred style. You can use the current title of the PR, for instance. |
07fd89b
to
9e6da4e
Compare
Did the change myself in the end. |
Thanks! And congrats for your first merged Godot contribution 🎉 |
It's a nice clarification, but I'll skip it from cherry-picking so we don't invalidate existing translations. |
I'm confused about which
Transform3D
theNode3D.basis
docs refer to:self.transform.basis
, orself.global_transform.basis
This PR edits the
Node3D.basis
description to clarify this, although I'm not sure I guessed the right one.