-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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 necessary elaboration to documentation for Node3D::get_parent_node_3d
#88841
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would've solved this differently in #87440 but it is good to have sooner than later.
This is true, but this is also a weird function IMO. It's probably too late now, but at least the code that it seems to be used for in the engine (which isn't in that many places) would be better understood if it were more explicit in its intention to use transforms it's dependent on or not. Like:
|
Indeed, the question the method asks/answers is "Which Node3D does my transformation directly depend on, if any?" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do approve of this as is, but I do agree it could be worded better.
Could you squash the commits? See PR workflow for instructions. |
Thanks! |
Cherry-picked for 4.2.2. |
This method returns
null
if the node hastop_level
set totrue
, and as such its behaviour is different from simply callingget_parent() as Node3D
. This important detail was not mentioned in the docs.