-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestScene.gd
More file actions
29 lines (23 loc) · 788 Bytes
/
Copy pathTestScene.gd
File metadata and controls
29 lines (23 loc) · 788 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
extends Spatial
export (PackedScene) var Cube
var cubeScene
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
var interface = ARVRServer.find_interface("OVRMobile")
if interface and interface.initialize():
# Tell our viewport it is the arvr viewport:
get_viewport().arvr = true
# change our physics fps
Engine.target_fps = 72
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if Input.is_action_pressed("ui_accept"):
_on_Player_handPinched("right_index")
func _on_Player_handPinched(_finger):
var cube = Cube.instance()
print($ObjectSpawn.translation)
add_child(cube)
print("handPinched main function called.")