-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
OpenXR all hand tracking and controller features #999
base: master
Are you sure you want to change the base?
OpenXR all hand tracking and controller features #999
Conversation
@onready var FlatDisplay = $FrontOfPlayer/FlatDisplayMesh/SubViewport/FlatDisplay | ||
@onready var joints3D = $Joints3D | ||
@onready var joints2D = $FrontOfPlayer/Joints2D |
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.
@onready var FlatDisplay = $FrontOfPlayer/FlatDisplayMesh/SubViewport/FlatDisplay | |
@onready var joints3D = $Joints3D | |
@onready var joints2D = $FrontOfPlayer/Joints2D | |
@onready var flat_display = $FrontOfPlayer/FlatDisplayMesh/SubViewport/FlatDisplay | |
@onready var joints_3D = $Joints3D | |
@onready var joints_2D = $FrontOfPlayer/Joints2D |
Use camel_case
in GDScript, same everywhere for variables
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.
Done the top one, not the others. I don't think the _ in joints_3D helps here. This is similar to a numbering example like (p1, p2, p3, ...)[good] vs (p_1, p_2, p_3,...)[bad].
Now you could argue that the D on the end converts it from a mere number into a separate word-clause in order to apply the notrunningwordstogether rule, but this is too pedantic. As to fixing all the other local variables, it's going to cause a lot of bugs. I could convert them all to two or three letter variables that don't require camel case or _ separators if that would help.
get_node("Joints3D/L0").transform.origin = Vector3(0,1.7,-0.2) | ||
|
||
|
||
func buttonsignal(name, hand, pressed): |
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.
func buttonsignal(name, hand, pressed): | |
func _button_signal(name, hand, pressed): |
Prefix private/internal methods with _
for clarity, same for all of these
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.
Done these. I don't think you mean that these are private/internal methods, since by their nature they are being called by signals from outside the class. I think the convention is for functions that are called by signals to be prefixed with the _ to make them look like they are not to be called from normal functions.
This demo illustrates all the available and working inputs from the OpenXR interface in raw and unfiltered form. This helps to tell which features are actually supported on each VR headset.
When hand-tracking is working there are 50 transforms corresponding to the joint positions and rotations for both hands as well as flags for tracking and validity. Each joint has a radius as well as linear and rotational velocity (this is not supported on some headsets). This demo also calculates and states the length of each finger as measured between these joints.
When controllers are in use there are only pose/transforms available (aim and grip), as well as 12 buttons, 10 touch sensors 4 linear values, and two XY thumb operated joysticks.
There are further features for interrogating the play area which will be implemented in version4.3