fix offsets syncing globally when controllers change power state

This commit is contained in:
Crispy 2021-05-22 21:17:07 +02:00
parent 54f9e4f85c
commit ac6f31aedf

View file

@ -11,7 +11,9 @@ export var overlay_scene =\
preload("res://addons/openvr_overlay/MissingOverlay.tscn") setget set_overlay_scene
export var width_meters = 0.4 setget set_width_in_meters
export var offsets:Dictionary = {
# if this is exported, all overlays sync offset when a controller is turned off/on
# this seems to be a bug with the godot editor-
var offsets:Dictionary = {
"head": {"pos": Vector3(), "rot": Quat()},
"left": {"pos": Vector3(), "rot": Quat()},
"right": {"pos": Vector3(), "rot": Quat()},
@ -78,7 +80,6 @@ func update_current_target():
# TODO fallback if not found
func _tracker_changed(tracker_name: String, type: int, id: int):
update_tracker_id()
update_offset()