This commit is contained in:
Crispy 2021-10-12 01:57:11 +02:00
parent b673410e70
commit a073c19e9c
2 changed files with 5 additions and 5 deletions

View file

@ -5,6 +5,8 @@ resource_local_to_scene = true
extents = Vector3( 0.2, 0.2, 0.01 )
[node name="OverlayArea" type="Area"]
collision_layer = 0
collision_mask = 6
[node name="CollisionShape" type="CollisionShape" parent="."]
shape = SubResource( 1 )

View file

@ -103,11 +103,9 @@ func _update_target():
_left_is_activator = t != "left"
_right_is_activator = t != "right"
# toggle appropriate colliders
#$VR/left/OverlayActivator/Collision.disabled = !_left_is_activator
#$VR/right/OverlayActivator/Collision.disabled = !_right_is_activator
_overlay_area.collision_mask = int(t!="right")*2
_overlay_area.collision_mask += int(t!="left")*4
# make area only detect colliders of a different hand
_overlay_area.collision_mask = int(t!="right")*2 # detect right hand
_overlay_area.collision_mask += int(t!="left")*4 # detect left hand
func _update_modules():