Skip to content

Commit 63a5d81

Browse files
committed
Added profiles for controllers
1 parent 1330297 commit 63a5d81

File tree

4 files changed

+132
-1
lines changed

4 files changed

+132
-1
lines changed

driver_tutorial_devices/driver/driver_tutorial_devices/driver.vrdrivermanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"alwaysActivate": true,
3-
"name" : "massless",
3+
"name" : "tutorial_devices",
44
"directory" : "",
55
"resourceOnly" : false,
66
"prefersUpperDeviceIndices" : true,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"jsonid": "input_profile",
3+
"controller_type": "tutorial_controller",
4+
"device_class": "TrackedDeviceClass_Controller",
5+
"resource_root": "tutorial_devices",
6+
"driver_name": "tutorial_devices",
7+
"input_bindingui_mode": "controller_handed",
8+
"should_show_binding_errors": true,
9+
"input_bindingui_left": {
10+
"transform": "scale(-1,1)",
11+
"image": "{tutorial_devices}/icons/tutorial_controller.svg"
12+
},
13+
"input_bindingui_right": {
14+
"image": "{tutorial_devices}/icons/tutorial_controller.svg"
15+
},
16+
"input_source": {
17+
"/pose/raw" : {
18+
"type" : "pose",
19+
"binding_image_point" : [ 0,0 ]
20+
},
21+
"/output/haptic": {
22+
"type": "vibration",
23+
"binding_image_point": [0,0]
24+
},
25+
"/input/a": {
26+
"type": "button",
27+
"click": true,
28+
"touch" : true,
29+
"binding_image_point": [0,0]
30+
},
31+
"/input/b": {
32+
"type": "button",
33+
"click": true,
34+
"touch" : true,
35+
"binding_image_point": [0,0]
36+
},
37+
"/input/trigger" : {
38+
"type" : "trigger",
39+
"click" : true,
40+
"touch" : true,
41+
"value" : true,
42+
"binding_image_point" : [ 0, 0 ]
43+
},
44+
"/input/grip" : {
45+
"type" : "trigger",
46+
"force" : true,
47+
"value" : true,
48+
"touch" : true,
49+
"input_activity_path" : "/input/grip/force",
50+
"input_activity_threshold" : 0.1,
51+
"binding_image_point" : [ 0, 0 ]
52+
},
53+
"/input/system": {
54+
"type": "button",
55+
"click": true,
56+
"touch" : true,
57+
"binding_image_point": [0,0]
58+
},
59+
"/input/trackpad": {
60+
"type": "trackpad",
61+
"click": true,
62+
"touch" : true,
63+
"binding_image_point": [0,0]
64+
},
65+
"/input/joystick": {
66+
"type": "joystick",
67+
"click": true,
68+
"touch": true,
69+
"binding_image_point": [0,0]
70+
},
71+
"/input/skeleton/left" : {
72+
"type" : "skeleton",
73+
"skeleton": "/skeleton/hand/left",
74+
"side" : "left",
75+
"binding_image_point" : [ 0, 0 ]
76+
},
77+
"/input/skeleton/right" : {
78+
"type" : "skeleton",
79+
"skeleton": "/skeleton/hand/right",
80+
"side" : "right",
81+
"binding_image_point" : [ 0, 0 ]
82+
}
83+
}
84+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"jsonid": "input_profile",
3+
"controller_type": "tutorial_tracker",
4+
"device_class": "TrackedDeviceClass_GenericTracker",
5+
"resource_root": "tutorial_devices",
6+
"driver_name": "tutorial_devices",
7+
"input_bindingui_mode": "single_device",
8+
"should_show_binding_errors": true,
9+
"input_bindingui_left": {
10+
"transform": "scale(-1,1)",
11+
"image": "{tutorial_devices}/icons/tutorial_tracker.svg"
12+
},
13+
"input_bindingui_right": {
14+
"image": "{tutorial_devices}/icons/tutorial_tracker.svg"
15+
},
16+
"input_source": {
17+
"/pose/raw" : {
18+
"type" : "pose",
19+
"binding_image_point" : [ 0,0 ]
20+
},
21+
"/output/haptic": {
22+
"type": "vibration",
23+
"binding_image_point": [0,0]
24+
},
25+
"/input/system": {
26+
"type": "button",
27+
"click": true,
28+
"binding_image_point": [0,0]
29+
}
30+
}
31+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[
2+
{
3+
"language_tag": "en_US",
4+
"tutorial_controller": "Tutorial Controller",
5+
"tutorial_tracker": "Tutorial Tracker",
6+
"tutorial_basestation": "Tutorial BaseStation",
7+
"/input/a": "A Button",
8+
"/input/b": "B Button",
9+
"/input/system": "System Button",
10+
"/input/trackpad": "Trackpad",
11+
"/input/joystick": "Joystick",
12+
"/input/skeleton": "Skeleton",
13+
"/input/trigger": "Trigger",
14+
"/output/haptic": "Haptic"
15+
}
16+
]

0 commit comments

Comments
 (0)