mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 18:03:27 +02:00
Merge pull request #11010 from druiz17/bug-tablet-third-person
You can now properly grab and move the tablet in third person
This commit is contained in:
commit
bec7f7c644
1 changed files with 12 additions and 3 deletions
|
@ -1034,9 +1034,18 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp) {
|
||||||
|
|
||||||
function getControllerJointIndex(hand) {
|
function getControllerJointIndex(hand) {
|
||||||
if (HMD.isHandControllerAvailable()) {
|
if (HMD.isHandControllerAvailable()) {
|
||||||
return MyAvatar.getJointIndex(hand === RIGHT_HAND ?
|
var controllerJointIndex = -1;
|
||||||
"_CONTROLLER_RIGHTHAND" :
|
if (Camera.mode === "first person") {
|
||||||
"_CONTROLLER_LEFTHAND");
|
controllerJointIndex = MyAvatar.getJointIndex(hand === RIGHT_HAND ?
|
||||||
|
"_CONTROLLER_RIGHTHAND" :
|
||||||
|
"_CONTROLLER_LEFTHAND");
|
||||||
|
} else if (Camera.mode === "third person") {
|
||||||
|
controllerJointIndex = MyAvatar.getJointIndex(hand === RIGHT_HAND ?
|
||||||
|
"_CAMERA_RELATIVE_CONTROLLER_RIGHTHAND" :
|
||||||
|
"_CAMERA_RELATIVE_CONTROLLER_LEFTHAND");
|
||||||
|
}
|
||||||
|
|
||||||
|
return controllerJointIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
return MyAvatar.getJointIndex("Head");
|
return MyAvatar.getJointIndex("Head");
|
||||||
|
|
Loading…
Reference in a new issue