diff --git a/app/assets/materials/grid.tres b/app/assets/materials/grid.tres index 0a5a2e9..86d1ec8 100644 --- a/app/assets/materials/grid.tres +++ b/app/assets/materials/grid.tres @@ -6,8 +6,8 @@ resource_local_to_scene = true render_priority = 8 shader = ExtResource("1_oebjc") -shader_parameter/dot_size = 0.12 -shader_parameter/dot_falloff = 0.024 -shader_parameter/size = 12.0 +shader_parameter/dot_size = 0.1 +shader_parameter/dot_falloff = 0.02 +shader_parameter/size = 10.0 shader_parameter/dot_offset = Vector2(0, 0) shader_parameter/supersampling = 8 diff --git a/app/content/main.tscn b/app/content/main.tscn index 5c9216d..d88c93b 100644 --- a/app/content/main.tscn +++ b/app/content/main.tscn @@ -36,6 +36,11 @@ unique_name_in_owner = true unique_name_in_owner = true transform = Transform3D(0.999999, -1.39633e-11, 0, 9.48075e-12, 1, 0, 0, 0, 1, -0.355145, 0.550439, -0.477945) +[node name="AutoHandtracker" parent="XROrigin3D/XRControllerLeft" index="2"] +applymiddlefingerfix = null +applyscaling = null +coincidewristorknuckle = null + [node name="IndexTip" parent="XROrigin3D/XRControllerLeft" index="4"] transform = Transform3D(0.967526, 0.252326, -0.0150302, -0.0150302, 0.116784, 0.993043, 0.252326, -0.960569, 0.116784, -0.00665802, 0.0427912, -0.169868) @@ -45,9 +50,6 @@ transform = Transform3D(0.967043, 0.24582, -0.0663439, -0.0663439, 0.494837, 0.8 [node name="MiddleTip" parent="XROrigin3D/XRControllerLeft" index="6"] transform = Transform3D(0.98042, 0.196912, 0.00149799, 0.001498, -0.015065, 0.999885, 0.196912, -0.980305, -0.0150651, -0.00327212, -0.00771427, -0.176318) -[node name="Palm" parent="XROrigin3D/XRControllerLeft" index="7"] -transform = Transform3D(1, 3.12364e-06, -3.13861e-06, -3.12371e-06, 1, -1.97886e-05, 3.13854e-06, 1.97889e-05, 1, 0.0307807, -0.0419721, -0.0399505) - [node name="XRControllerRight" parent="XROrigin3D" instance=ExtResource("7_0b3tc")] unique_name_in_owner = true transform = Transform3D(0.999999, -1.39635e-11, 0, 1.31553e-10, 1, 0, 0, 0, 1, 0.336726, 0.575093, -0.437942) diff --git a/app/content/system/controller_left/controller_left.gd b/app/content/system/controller_left/controller_left.gd index d2263a0..a30f278 100644 --- a/app/content/system/controller_left/controller_left.gd +++ b/app/content/system/controller_left/controller_left.gd @@ -23,6 +23,13 @@ const Miniature = preload ("res://content/system/miniature/miniature.gd") @onready var ray: RayCast3D = $Raycast @onready var quick_actions = $Palm/QuickActions +@export var show_grid = false: + set(value): + show_grid = value + + if ray != null: + ray.with_grid = value + var hand_active = false: set(value): hand_active = value diff --git a/app/content/system/controller_left/controller_left.tscn b/app/content/system/controller_left/controller_left.tscn index 905c147..219c437 100644 --- a/app/content/system/controller_left/controller_left.tscn +++ b/app/content/system/controller_left/controller_left.tscn @@ -39,6 +39,9 @@ is_right = false [node name="AutoHandtracker" parent="." instance=ExtResource("4_oe7fv")] visible = false +applymiddlefingerfix = null +applyscaling = null +coincidewristorknuckle = null visiblehandtrackskeleton = false enableautotracker = false diff --git a/app/content/system/controller_right/controller_right.gd b/app/content/system/controller_right/controller_right.gd index d338c5e..c08f470 100644 --- a/app/content/system/controller_right/controller_right.gd +++ b/app/content/system/controller_right/controller_right.gd @@ -16,6 +16,13 @@ const Miniature = preload ("res://content/system/miniature/miniature.gd") @onready var thumb_tip = $ThumbTip @onready var middle_tip = $MiddleTip +@export var show_grid = false: + set(value): + show_grid = value + + if ray != null: + ray.with_grid = value + var hand_active = false: set(value): hand_active = value @@ -39,6 +46,8 @@ func _ready(): EventSystem.emit_action(action_name, false, true) ) + _setup_hand() + func _setup_hand(): TouchManager.add_finger(Finger.Type.INDEX_RIGHT, $IndexTip/TouchArea) diff --git a/app/content/system/controller_right/controller_right.tscn b/app/content/system/controller_right/controller_right.tscn index 364096c..7704fe2 100644 --- a/app/content/system/controller_right/controller_right.tscn +++ b/app/content/system/controller_right/controller_right.tscn @@ -27,16 +27,16 @@ mesh = SubResource("BoxMesh_ir3co") [node name="Raycast" parent="." instance=ExtResource("1_3p68p")] -[node name="hand_r" parent="." instance=ExtResource("2_kex6u")] - -[node name="mesh_Hand_R" parent="hand_r/Armature/Skeleton3D" index="0"] -material_override = ExtResource("4_vhkya") - [node name="AutoHandtracker" parent="." instance=ExtResource("3_pjmb2")] visible = false visiblehandtrackskeleton = false enableautotracker = false +[node name="hand_r" parent="." instance=ExtResource("2_kex6u")] + +[node name="mesh_Hand_R" parent="hand_r/Armature/Skeleton3D" index="0"] +material_override = ExtResource("4_vhkya") + [node name="IndexTip" type="BoneAttachment3D" parent="."] transform = Transform3D(0.967526, -0.252326, 0.0150302, 0.0150302, 0.116784, 0.993043, -0.252326, -0.960569, 0.116784, 0.00665802, 0.0427913, -0.169868) bone_name = "Index_Tip_R" diff --git a/app/content/system/house/house.gd b/app/content/system/house/house.gd index 592ef12..148bfb0 100644 --- a/app/content/system/house/house.gd +++ b/app/content/system/house/house.gd @@ -73,6 +73,9 @@ func edit_room(room_name): if room == editing_room: return + App.controller_left.show_grid = false + App.controller_right.show_grid = false + if editing_room != null: editing_room.editable = false editing_room = null @@ -80,6 +83,8 @@ func edit_room(room_name): if room != null: room.editable = true editing_room = room + App.controller_left.show_grid = true + App.controller_right.show_grid = true func is_valid_room(room_name): var room = find_room(room_name) diff --git a/app/lib/home_apis/hass_ws/handlers/assist.gd b/app/lib/home_apis/hass_ws/handlers/assist.gd index 7deb83e..f8e6ca0 100644 --- a/app/lib/home_apis/hass_ws/handlers/assist.gd +++ b/app/lib/home_apis/hass_ws/handlers/assist.gd @@ -60,7 +60,7 @@ func send_data(data: PackedByteArray): stream.encode_s8(0, handler_id) stream.append_array(data) - api.send_raw(stream) + api.connection.send_raw(stream) func handle_message(message: Dictionary): if message["type"] != "event":