godot icon indicating copy to clipboard operation
godot copied to clipboard

Remove the Hand enum from XRHandTracker

Open Malcolmnixon opened this issue 1 year ago • 4 comments

History

When initially introduced for Godot 4.3, the new XRHandTracker resource was written with a Hand enum [Left=0, Right=1] and a hand property describing the hand being tracked.

When the XR-Trackers were subsequently reorganized into an inheritance-tree, the XRHandTracker was modified to extend from XRPositionalTracker which already has a hand 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 to Hand, causing a direct name collision with the XRHandTracker::Hand enum.

Change

This PR completely removes the XRHandTracker::Hand enum and getter/setter methods, as they are simply duplicate information for the existing XRPositionalTracker 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.

Malcolmnixon avatar Apr 25 '24 01:04 Malcolmnixon

Does anyone know why the unit tests are failing?

fire avatar Apr 25 '24 12:04 fire

Does anyone know why the unit tests are failing?

It's unrelated. Re-basing on master will fix it. I had this on some other PRs I was working on as well.

dsnopek avatar Apr 25 '24 14:04 dsnopek

No rush, but a reminder that the pull request is not able to be merged as is because of failing Github actions.

fire avatar Apr 25 '24 17:04 fire

It's unrelated. Re-basing on master will fix it. I had this on some other PRs I was working on as well.

Rebasing solved the build issue.

Malcolmnixon avatar Apr 26 '24 00:04 Malcolmnixon

Thanks!

akien-mga avatar Apr 26 '24 09:04 akien-mga