-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Remove the Hand enum from XRHandTracker #91130
Remove the Hand enum from XRHandTracker #91130
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.
LGTM, just need to fix the issue david found.
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 accepted this reasoning when we discussed during the xr meeting.
Does anyone know why the unit tests are failing? |
It's unrelated. Re-basing on |
No rush, but a reminder that the pull request is not able to be merged as is because of failing Github actions. |
5688cbd
to
67f2914
Compare
…e hand property of the base class. Co-Authored-By: David Snopek <[email protected]>
67f2914
to
e00e5c0
Compare
Rebasing solved the build issue. |
Thanks! |
History
When initially introduced for Godot 4.3, the new
XRHandTracker
resource was written with aHand
enum [Left=0, Right=1] and ahand
property describing the hand being tracked.When the XR-Trackers were subsequently reorganized into an inheritance-tree, the
XRHandTracker
was modified to extend fromXRPositionalTracker
which already has ahand
property [Unknown=0, Left=1, Right=2] relaying identical information.At the time of the XR-Tracker refactoring, the decision was made to keep the
XRHandTracker::Hand
enum and getter/setter methods, but to drop the property as this was causing a direct name-collision.Problem
What was missed was that for C#/.Net, properties are converted to PascalCase, and so the
XRPositionalTracker
hand property is renamed toHand
, causing a direct name collision with theXRHandTracker::Hand
enum.Change
This PR completely removes the
XRHandTracker::Hand
enum and getter/setter methods, as they are simply duplicate information for the existingXRPositionalTracker
hand property.The
XRHandTracker
type has not been released yet, and so cleaning it of duplicate/confusing accessors for the same information is preferred - and has the benefit of fixing the C#/.Net name collision.