mirror of
https://github.com/CrispyPin/ovr-utils.git
synced 2024-11-22 23:50:25 +01:00
update tracking when target is changed at runtime
This commit is contained in:
parent
3d3c13869b
commit
e321a72c23
1 changed files with 7 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
enum TARGETS { head, left, right, world }
|
enum TARGETS { head, left, right, world }
|
||||||
export (TARGETS) var target = TARGETS.head
|
export (TARGETS) var target = TARGETS.head setget _set_target
|
||||||
export var overlay_scene = preload("res://addons/openvr_overlay/MissingOverlay.tscn") setget _set_overlay_scene
|
export var overlay_scene = preload("res://addons/openvr_overlay/MissingOverlay.tscn") setget _set_overlay_scene
|
||||||
export var offset_pos := Vector3(0, 0, -1) setget _set_offset_pos
|
export var offset_pos := Vector3(0, 0, -1) setget _set_offset_pos
|
||||||
export var offset_rot: Vector3 setget _set_offset_rot
|
export var offset_rot: Vector3 setget _set_offset_rot
|
||||||
|
@ -69,6 +69,12 @@ func get_tracker_id() -> int:
|
||||||
return _tracker_id
|
return _tracker_id
|
||||||
|
|
||||||
|
|
||||||
|
func _set_target(new: int):
|
||||||
|
target = new
|
||||||
|
update_tracker_id()
|
||||||
|
update_offset()
|
||||||
|
|
||||||
|
|
||||||
func _set_offset_pos(pos: Vector3):
|
func _set_offset_pos(pos: Vector3):
|
||||||
offset_pos = pos
|
offset_pos = pos
|
||||||
update_offset()
|
update_offset()
|
||||||
|
|
Loading…
Reference in a new issue