fix bugs in right hand, hass_ws adn grid

This commit is contained in:
Nitwel 2024-05-23 14:18:21 +02:00
parent 1a2ec79de3
commit 109b62e869
8 changed files with 38 additions and 12 deletions

View File

@ -6,8 +6,8 @@
resource_local_to_scene = true resource_local_to_scene = true
render_priority = 8 render_priority = 8
shader = ExtResource("1_oebjc") shader = ExtResource("1_oebjc")
shader_parameter/dot_size = 0.12 shader_parameter/dot_size = 0.1
shader_parameter/dot_falloff = 0.024 shader_parameter/dot_falloff = 0.02
shader_parameter/size = 12.0 shader_parameter/size = 10.0
shader_parameter/dot_offset = Vector2(0, 0) shader_parameter/dot_offset = Vector2(0, 0)
shader_parameter/supersampling = 8 shader_parameter/supersampling = 8

View File

@ -36,6 +36,11 @@ unique_name_in_owner = true
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) 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"] [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) 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"] [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) 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")] [node name="XRControllerRight" parent="XROrigin3D" instance=ExtResource("7_0b3tc")]
unique_name_in_owner = true 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) transform = Transform3D(0.999999, -1.39635e-11, 0, 1.31553e-10, 1, 0, 0, 0, 1, 0.336726, 0.575093, -0.437942)

View File

@ -23,6 +23,13 @@ const Miniature = preload ("res://content/system/miniature/miniature.gd")
@onready var ray: RayCast3D = $Raycast @onready var ray: RayCast3D = $Raycast
@onready var quick_actions = $Palm/QuickActions @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: var hand_active = false:
set(value): set(value):
hand_active = value hand_active = value

View File

@ -39,6 +39,9 @@ is_right = false
[node name="AutoHandtracker" parent="." instance=ExtResource("4_oe7fv")] [node name="AutoHandtracker" parent="." instance=ExtResource("4_oe7fv")]
visible = false visible = false
applymiddlefingerfix = null
applyscaling = null
coincidewristorknuckle = null
visiblehandtrackskeleton = false visiblehandtrackskeleton = false
enableautotracker = false enableautotracker = false

View File

@ -16,6 +16,13 @@ const Miniature = preload ("res://content/system/miniature/miniature.gd")
@onready var thumb_tip = $ThumbTip @onready var thumb_tip = $ThumbTip
@onready var middle_tip = $MiddleTip @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: var hand_active = false:
set(value): set(value):
hand_active = value hand_active = value
@ -39,6 +46,8 @@ func _ready():
EventSystem.emit_action(action_name, false, true) EventSystem.emit_action(action_name, false, true)
) )
_setup_hand()
func _setup_hand(): func _setup_hand():
TouchManager.add_finger(Finger.Type.INDEX_RIGHT, $IndexTip/TouchArea) TouchManager.add_finger(Finger.Type.INDEX_RIGHT, $IndexTip/TouchArea)

View File

@ -27,16 +27,16 @@ mesh = SubResource("BoxMesh_ir3co")
[node name="Raycast" parent="." instance=ExtResource("1_3p68p")] [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")] [node name="AutoHandtracker" parent="." instance=ExtResource("3_pjmb2")]
visible = false visible = false
visiblehandtrackskeleton = false visiblehandtrackskeleton = false
enableautotracker = 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="."] [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) 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" bone_name = "Index_Tip_R"

View File

@ -73,6 +73,9 @@ func edit_room(room_name):
if room == editing_room: if room == editing_room:
return return
App.controller_left.show_grid = false
App.controller_right.show_grid = false
if editing_room != null: if editing_room != null:
editing_room.editable = false editing_room.editable = false
editing_room = null editing_room = null
@ -80,6 +83,8 @@ func edit_room(room_name):
if room != null: if room != null:
room.editable = true room.editable = true
editing_room = room editing_room = room
App.controller_left.show_grid = true
App.controller_right.show_grid = true
func is_valid_room(room_name): func is_valid_room(room_name):
var room = find_room(room_name) var room = find_room(room_name)

View File

@ -60,7 +60,7 @@ func send_data(data: PackedByteArray):
stream.encode_s8(0, handler_id) stream.encode_s8(0, handler_id)
stream.append_array(data) stream.append_array(data)
api.send_raw(stream) api.connection.send_raw(stream)
func handle_message(message: Dictionary): func handle_message(message: Dictionary):
if message["type"] != "event": if message["type"] != "event":