mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 14:09:01 +02:00
Merge pull request #7005 from sethalves/grab-user-controller-rotation
use controller hand rotation rather than IK hand rotation in grab script
This commit is contained in:
commit
fb9df717b6
1 changed files with 6 additions and 2 deletions
|
@ -236,10 +236,14 @@ function MyController(hand) {
|
||||||
this.hand = hand;
|
this.hand = hand;
|
||||||
if (this.hand === RIGHT_HAND) {
|
if (this.hand === RIGHT_HAND) {
|
||||||
this.getHandPosition = MyAvatar.getRightPalmPosition;
|
this.getHandPosition = MyAvatar.getRightPalmPosition;
|
||||||
this.getHandRotation = MyAvatar.getRightPalmRotation;
|
// this.getHandRotation = MyAvatar.getRightPalmRotation;
|
||||||
} else {
|
} else {
|
||||||
this.getHandPosition = MyAvatar.getLeftPalmPosition;
|
this.getHandPosition = MyAvatar.getLeftPalmPosition;
|
||||||
this.getHandRotation = MyAvatar.getLeftPalmRotation;
|
// this.getHandRotation = MyAvatar.getLeftPalmRotation;
|
||||||
|
}
|
||||||
|
this.getHandRotation = function() {
|
||||||
|
var controllerHandInput = (this.hand === RIGHT_HAND) ? Controller.Standard.RightHand : Controller.Standard.LeftHand;
|
||||||
|
return Quat.multiply(MyAvatar.orientation, Controller.getPoseValue(controllerHandInput).rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.actionID = null; // action this script created...
|
this.actionID = null; // action this script created...
|
||||||
|
|
Loading…
Reference in a new issue