Skip to content
Snippets Groups Projects
Commit b4ca6c52 authored by Robert Long's avatar Robert Long
Browse files

Oculus Go Support

parent b01f761f
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
@import 'audio';
@import 'info-dialog';
.a-enter-vr {
.a-enter-vr, .a-orientation-modal {
display: none;
}
......
......@@ -13,6 +13,7 @@ const POSES = {
export const CONTROLLER_OFFSETS = {
default: new THREE.Matrix4(),
"oculus-touch-controls": new THREE.Matrix4().makeTranslation(0, -0.015, 0.04),
"oculus-go-controls": new THREE.Matrix4(),
"vive-controls": new THREE.Matrix4().compose(
new THREE.Vector3(0, -0.017, 0.13),
new THREE.Quaternion().setFromEuler(new THREE.Euler(-40 * THREE.Math.DEG2RAD, 0, 0)),
......@@ -115,6 +116,7 @@ AFRAME.registerComponent("hand-controls2", {
if (hand !== prevData) {
el.setAttribute("vive-controls", controlConfiguration);
el.setAttribute("oculus-touch-controls", controlConfiguration);
el.setAttribute("oculus-go-controls", controlConfiguration);
el.setAttribute("windows-motion-controls", controlConfiguration);
el.setAttribute("daydream-controls", controlConfiguration);
el.setAttribute("gearvr-controls", controlConfiguration);
......
......@@ -33,7 +33,8 @@
mute-mic="eventSrc: a-scene; toggleEvents: action_mute"
freeze-controller="toggleEvent: action_freeze"
personal-space-bubble="debug: false;"
>
vr-mode-ui="enabled: false"
>
<a-assets>
<img id="tooltip" src="./assets/hud/tooltip.9.png" >
......
......@@ -34,6 +34,9 @@ const config = {
},
"gearvr-controls": {
trackpad: "trackpad_dpad4"
},
"oculus-go-controls": {
trackpad: "trackpad_dpad4"
}
}
},
......@@ -123,6 +126,16 @@ const config = {
triggerdown: ["action_primary_down"],
triggerup: ["action_primary_up"]
},
"oculus-go-controls": {
trackpad_dpad4_pressed_west_down: "snap_rotate_left",
trackpad_dpad4_pressed_east_down: "snap_rotate_right",
trackpad_dpad4_pressed_center_down: ["action_primary_down"],
trackpad_dpad4_pressed_north_down: ["action_primary_down"],
trackpad_dpad4_pressed_south_down: ["action_primary_down"],
trackpadup: ["action_primary_up"],
triggerdown: ["action_primary_down"],
triggerup: ["action_primary_up"]
},
keyboard: {
m_press: "action_mute",
q_press: "snap_rotate_left",
......@@ -182,6 +195,10 @@ const config = {
"gearvr-controls": {
trackpaddown: { right: "action_ui_select_down" },
trackpadup: { right: "action_ui_select_up" }
},
"oculus-go-controls": {
trackpaddown: { right: "action_ui_select_down" },
trackpadup: { right: "action_ui_select_up" }
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment