mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 15:42:39 +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) {
|
||||
if (HMD.isHandControllerAvailable()) {
|
||||
return MyAvatar.getJointIndex(hand === RIGHT_HAND ?
|
||||
"_CONTROLLER_RIGHTHAND" :
|
||||
"_CONTROLLER_LEFTHAND");
|
||||
var controllerJointIndex = -1;
|
||||
if (Camera.mode === "first person") {
|
||||
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");
|
||||
|
|
Loading…
Reference in a new issue