mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Hand controller data may not be valid
This commit is contained in:
parent
925cca97db
commit
6452e92ac9
1 changed files with 5 additions and 1 deletions
|
@ -51,14 +51,18 @@ function calcSpawnInfo(hand, tabletHeight) {
|
||||||
hand = NO_HANDS;
|
hand = NO_HANDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var handController = null;
|
||||||
if (HMD.active && hand !== NO_HANDS) {
|
if (HMD.active && hand !== NO_HANDS) {
|
||||||
|
handController = getControllerWorldLocation(hand, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (handController && handController.valid) {
|
||||||
// Orient tablet per hand orientation.
|
// Orient tablet per hand orientation.
|
||||||
// Angle it back similar to holding it like a book.
|
// Angle it back similar to holding it like a book.
|
||||||
// Make it horizontal.
|
// Make it horizontal.
|
||||||
// Move tablet up so that hand is at bottom.
|
// Move tablet up so that hand is at bottom.
|
||||||
// Move tablet back so that hand is in front.
|
// Move tablet back so that hand is in front.
|
||||||
|
|
||||||
var handController = getControllerWorldLocation(hand, true);
|
|
||||||
var position = handController.position;
|
var position = handController.position;
|
||||||
var rotation = handController.rotation;
|
var rotation = handController.rotation;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue