mirror of
https://github.com/CrispyPin/ovr-utils.git
synced 2024-11-12 19:40:26 +01:00
cleanup
This commit is contained in:
parent
b673410e70
commit
a073c19e9c
2 changed files with 5 additions and 5 deletions
|
@ -5,6 +5,8 @@ resource_local_to_scene = true
|
||||||
extents = Vector3( 0.2, 0.2, 0.01 )
|
extents = Vector3( 0.2, 0.2, 0.01 )
|
||||||
|
|
||||||
[node name="OverlayArea" type="Area"]
|
[node name="OverlayArea" type="Area"]
|
||||||
|
collision_layer = 0
|
||||||
|
collision_mask = 6
|
||||||
|
|
||||||
[node name="CollisionShape" type="CollisionShape" parent="."]
|
[node name="CollisionShape" type="CollisionShape" parent="."]
|
||||||
shape = SubResource( 1 )
|
shape = SubResource( 1 )
|
||||||
|
|
|
@ -103,11 +103,9 @@ func _update_target():
|
||||||
|
|
||||||
_left_is_activator = t != "left"
|
_left_is_activator = t != "left"
|
||||||
_right_is_activator = t != "right"
|
_right_is_activator = t != "right"
|
||||||
# toggle appropriate colliders
|
# make area only detect colliders of a different hand
|
||||||
#$VR/left/OverlayActivator/Collision.disabled = !_left_is_activator
|
_overlay_area.collision_mask = int(t!="right")*2 # detect right hand
|
||||||
#$VR/right/OverlayActivator/Collision.disabled = !_right_is_activator
|
_overlay_area.collision_mask += int(t!="left")*4 # detect left hand
|
||||||
_overlay_area.collision_mask = int(t!="right")*2
|
|
||||||
_overlay_area.collision_mask += int(t!="left")*4
|
|
||||||
|
|
||||||
|
|
||||||
func _update_modules():
|
func _update_modules():
|
||||||
|
|
Loading…
Reference in a new issue