mirror of
https://github.com/CrispyPin/ovr-utils.git
synced 2024-11-10 02:40:25 +01:00
plugin: update overlay width when changed at runtime
This commit is contained in:
parent
9bda7d6169
commit
c64a5c9ba4
2 changed files with 6 additions and 2 deletions
|
@ -5,7 +5,7 @@ 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 offset_pos := Vector3(0, 0, -1) setget _set_offset_pos
|
||||
export var offset_rot: Vector3 setget _set_offset_rot
|
||||
export var width_meters = 0.4
|
||||
export var width_meters = 0.4 setget _set_width_meters
|
||||
export var fallback_to_hmd = false # fallback is only applied if tracker is not present at startup
|
||||
|
||||
var _tracker_id: int = 0 setget ,get_tracker_id
|
||||
|
@ -85,6 +85,11 @@ func _set_offset_rot(rot: Vector3):
|
|||
update_offset()
|
||||
|
||||
|
||||
func _set_width_meters(width: float):
|
||||
width_meters = width
|
||||
$OverlayViewport.overlay_width_in_meters = width_meters
|
||||
|
||||
|
||||
func _set_overlay_scene(scene: PackedScene):
|
||||
overlay_scene = scene
|
||||
if $OverlayViewport.get_children():
|
||||
|
|
|
@ -31,7 +31,6 @@ singletons=[ "res://addons/godot-openvr/godot_openvr.gdnlib" ]
|
|||
|
||||
[physics]
|
||||
|
||||
common/physics_fps=1
|
||||
common/enable_pause_aware_picking=true
|
||||
|
||||
[rendering]
|
||||
|
|
Loading…
Reference in a new issue