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

Saving the hand_mesh.gd file overwrites the hand=1 setting in right_hand_mesh.tscn #205

Open
goatchurchprime opened this issue May 8, 2022 · 3 comments

Comments

@goatchurchprime
Copy link

The Script variable "Hand" is missing from the Inspector in this docs page https://docs.godotengine.org/en/stable/tutorials/vr/openxr/handtracking.html#node-based-hand-tracking

This made it really hard to discover that its value is wrong in the release version of the plugin (from Feb 19).

If you unzip the distribution: https://github.com/GodotVR/godot_openxr/releases/tag/1.2.0 the code in
/godot_openxr_1.2.0/addons/godot-openxr/scenes/right_hand_mesh.tscn is mssing the important setting that is present
in the demo code:

https://github.com/GodotVR/godot_openxr/blob/master/demo/addons/godot-openxr/scenes/right_hand_mesh.tscn#L23

[node name="Skeleton" parent="HandModel/Armature" index="0"]
bones/9/bound_children = [ NodePath("IndexTip") ]
script = ExtResource( 1 )
hand = 1             <------------------- this hidden value is missing!!!

This means that you get two left hands no matter what.

@BastiaanOlij
Copy link
Member

Those values should be coming from the GDNative script so it sounds like the script is not applied properly (thought that should be the script = ExtResource ( 1 ) bit). Is this issue that is reproducible on the latest master because it is working fine for me?

@goatchurchprime
Copy link
Author

You're right. I double-checked and I thought I was losing my mind

However I can now recreate the problem, which I think is pretty bad and might need to go into the main Godot tickets, though I don't know where:

Step1: Download and install OpenXR Plugin

Step 2: Open the file yourproject/addons/godot-openxr/scenes/right_hand_mesh.tscn in a text editor (so you can watch it change)

Step 3: Open scenes/right_hand_mesh.tscn in the Godot editor

Step 4: Click on the script on the root node: res://addons/godot-openxr/scenes/hand_mesh.gd

Step 5: Click Control-S to save the file. (Why? Maybe by habit, or you put in some debug print statements.)

Step 6: See that line 18 'path = "/user/hand/right"' and line 23 'hand = 1' both disappear from the tscn file

Step 7: Now you have two left hands and there is no way to see why.

Is it because the hand value is hidden and not properly disclosed to the user interface that it gets over-written/deleted?

@goatchurchprime goatchurchprime changed the title Right hand mesh and nodes not initialized with hand=1 Saving the hand_mesh.gd file overwrites the hand=1 setting in right_hand_mesh.tscn May 9, 2022
@BastiaanOlij
Copy link
Member

Owh that sounds like a bug in the editor. Saving the script will cause Godot to update the properties on the scenes loaded, but it shouldn't be changing values of properties that have been overriden in the scene.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants