-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_sense.gd
More file actions
31 lines (21 loc) · 964 Bytes
/
main_sense.gd
File metadata and controls
31 lines (21 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
extends Spatial
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
func _init():
# Get configuration object
var OpenVRConfig = preload("res://addons/godot-openvr/OpenVRConfig.gdns").new()
OpenVRConfig.set_application_type(2) # Set to OVERLAY MODE = 2, NORMAL MODE = 1
OpenVRConfig.set_tracking_universe(1) # Set to SEATED MODE = 0, STANDING MODE = 1, RAW MODE = 2
# Find the OpenVR interface and initialise it
var arvr_interface : ARVRInterface = ARVRServer.find_interface("OpenVR")
if arvr_interface and arvr_interface.initialize():
print(arvr_interface.get_render_targetsize())
# $viewport is null in _init(), so I set it in the sense
#$Viewport.size = arvr_interface.get_render_targetsize()
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass