Skip to content

Commit

Permalink
Create hand tracking sample project (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
devloglogan authored Jun 20, 2024
1 parent 765689b commit da970d5
Show file tree
Hide file tree
Showing 17 changed files with 1,933 additions and 258 deletions.
3 changes: 0 additions & 3 deletions demo/main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ var selected_spatial_anchor_node: Node3D = null
@onready var scene_manager: OpenXRFbSceneManager = $XROrigin3D/OpenXRFbSceneManager
@onready var spatial_anchor_manager: OpenXRFbSpatialAnchorManager = $XROrigin3D/OpenXRFbSpatialAnchorManager

const PASSTHROUGH_MODE_STRING_BASE = "[B] Passthrough Mode: "
const PASSTHROUGH_FILTER_STRING_BASE = "[A] Passthrough Filter: "

const SPATIAL_ANCHORS_FILE = "user://openxr_fb_spatial_anchors.json"
const SpatialAnchor = preload("res://spatial_anchor.tscn")

Expand Down
10 changes: 1 addition & 9 deletions demo/main.tscn
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[gd_scene load_steps=22 format=3 uid="uid://cqsodpswgup8w"]
[gd_scene load_steps=21 format=3 uid="uid://cqsodpswgup8w"]

[ext_resource type="Script" path="res://main.gd" id="1_fsva1"]
[ext_resource type="PackedScene" uid="uid://c0uv4eu2yjm3b" path="res://viewport_2d_in_3d.tscn" id="2_7whgo"]
[ext_resource type="PackedScene" uid="uid://d4b4rllli6tqp" path="res://tablet_content.tscn" id="3_45w5g"]
[ext_resource type="PackedScene" uid="uid://bcjp8kcgde4cs" path="res://scene_anchor.tscn" id="4_3u3ah"]
[ext_resource type="PackedScene" uid="uid://cay8oh2ll7yxi" path="res://assets/test_kun/Test-Kun.fbx" id="4_b317s"]
[ext_resource type="PackedScene" uid="uid://bwfyi8pgigune" path="res://xr_fb_hand_tracking_aim_demo.tscn" id="5_6bxyh"]
[ext_resource type="PackedScene" uid="uid://bwo5nq0clfe3c" path="res://scene_global_mesh.tscn" id="5_7ikgf"]
[ext_resource type="PackedScene" uid="uid://dsfd7xrm6o50p" path="res://spatial_anchor.tscn" id="5_g7mio"]
[ext_resource type="Material" uid="uid://bdwh0vc86hsdb" path="res://assets/hand_silhouette_outline_mat.tres" id="7_tpkib"]
Expand Down Expand Up @@ -204,16 +203,9 @@ bone_update = 1
[node name="XRFaceModifier3D" type="XRFaceModifier3D" parent="Floor/AvatarOffset/Avatar"]
target = NodePath("../Test-Kun/Armature/GeneralSkeleton/Body")

[node name="XRFbHandTrackingAimDemo" parent="." instance=ExtResource("5_6bxyh")]
transform = Transform3D(0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, 0.707107, -1, 1, -1)

[connection signal="button_pressed" from="XROrigin3D/LeftHand" to="." method="_on_left_hand_button_pressed"]
[connection signal="button_pressed" from="XROrigin3D/LeftHand" to="XRFbHandTrackingAimDemo" method="_on_left_hand_button_pressed"]
[connection signal="button_released" from="XROrigin3D/LeftHand" to="XRFbHandTrackingAimDemo" method="_on_left_hand_button_released"]
[connection signal="openxr_fb_render_model_loaded" from="XROrigin3D/LeftHand/LeftControllerFbRenderModel" to="." method="_on_left_controller_fb_render_model_render_model_loaded"]
[connection signal="button_pressed" from="XROrigin3D/RightHand" to="." method="_on_right_hand_button_pressed"]
[connection signal="button_pressed" from="XROrigin3D/RightHand" to="XRFbHandTrackingAimDemo" method="_on_right_hand_button_pressed"]
[connection signal="button_released" from="XROrigin3D/RightHand" to="XRFbHandTrackingAimDemo" method="_on_right_hand_button_released"]
[connection signal="openxr_fb_render_model_loaded" from="XROrigin3D/RightHand/RightControllerFbRenderModel" to="." method="_on_right_controller_fb_render_model_render_model_loaded"]
[connection signal="openxr_fb_scene_capture_completed" from="XROrigin3D/OpenXRFbSceneManager" to="." method="_on_scene_manager_scene_capture_completed"]
[connection signal="openxr_fb_scene_data_missing" from="XROrigin3D/OpenXRFbSceneManager" to="." method="_on_scene_manager_scene_data_missing"]
Expand Down
1 change: 0 additions & 1 deletion demo/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@ openxr/enabled=true
openxr/reference_space=1
openxr/extensions/eye_gaze_interaction=true
shaders/enabled=true
openxr/extensions/hand_tracking_aim=true
67 changes: 0 additions & 67 deletions demo/xr_fb_hand_tracking_aim_demo.gd

This file was deleted.

178 changes: 0 additions & 178 deletions demo/xr_fb_hand_tracking_aim_demo.tscn

This file was deleted.

5 changes: 5 additions & 0 deletions samples/fb-hand-tracking-sample/capsule_material.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://byw0vgyxg33ha"]

[resource]
transparency = 1
albedo_color = Color(0, 1, 0, 0.686275)
Loading

0 comments on commit da970d5

Please sign in to comment.