Merge pull request #9490 from hyperlogic/tablet-ui

For for Tablet Tilt and Oculus Touch A B buttons sending UINav events
This commit is contained in:
Seth Alves 2017-01-23 18:14:53 -08:00 committed by GitHub
commit 353b38286a
3 changed files with 7 additions and 5 deletions

View file

@ -6,9 +6,7 @@
{ "from": "Standard.DL", "to": "Actions.UiNavLateral", "filters": "invert" },
{ "from": "Standard.DR", "to": "Actions.UiNavLateral" },
{ "from": "Standard.LB", "to": "Actions.UiNavGroup","filters": "invert" },
{ "from": "Standard.RB", "to": "Actions.UiNavGroup" },
{ "from": [ "Standard.A", "Standard.X" ], "to": "Actions.UiNavSelect" },
{ "from": [ "Standard.B", "Standard.Y" ], "to": "Actions.UiNavBack" }
{ "from": "Standard.RB", "to": "Actions.UiNavGroup" }
]
}

View file

@ -56,6 +56,9 @@
{ "from": "GamePad.A", "to": "Standard.A" },
{ "from": "GamePad.B", "to": "Standard.B" },
{ "from": "GamePad.X", "to": "Standard.X" },
{ "from": "GamePad.Y", "to": "Standard.Y" }
{ "from": "GamePad.Y", "to": "Standard.Y" },
{ "from": [ "Standard.A", "Standard.X" ], "to": "Actions.UiNavSelect" },
{ "from": [ "Standard.B", "Standard.Y" ], "to": "Actions.UiNavBack" }
]
}

View file

@ -64,9 +64,10 @@ function calcSpawnInfo(hand, height) {
} else {
var front = Quat.getFront(Camera.orientation);
finalPosition = Vec3.sum(Camera.position, Vec3.multiply(0.6, front));
var orientation = Quat.lookAt({x: 0, y: 0, z: 0}, front, {x: 0, y: 1, z: 0});
return {
position: finalPosition,
rotation: Quat.multiply(Camera.orientation, {x: 0, y: 1, z: 0, w: 0})
rotation: Quat.multiply(orientation, {x: 0, y: 1, z: 0, w: 0})
};
}
}