mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 06:53:59 +02:00
Initial Commit :
1) Resolve a bug when 2 different entity is grabbed in 2 hands. And move your left hand and entity of left hand grow/shrink when you move right/left hand. 2) Resolve right hand-left hand grow-shrink functionality
This commit is contained in:
parent
9a80a81321
commit
580c2548e9
1 changed files with 7 additions and 1 deletions
|
@ -3330,11 +3330,17 @@ function MyController(hand) {
|
|||
return;
|
||||
}
|
||||
|
||||
var isSameEntityInBothControllers = false;
|
||||
if (leftController.grabbedThingID && rightController.grabbedThingID &&
|
||||
leftController.grabbedThingID == rightController.grabbedThingID) {
|
||||
isSameEntityInBothControllers = true;
|
||||
}
|
||||
|
||||
if (!this.shouldScale) {
|
||||
// If both secondary triggers squeezed, and the non-holding hand is empty, start scaling
|
||||
if (this.secondarySqueezed() &&
|
||||
this.getOtherHandController().secondarySqueezed() &&
|
||||
this.getOtherHandController().state === STATE_OFF) {
|
||||
isSameEntityInBothControllers) {
|
||||
this.scalingStartDistance = Vec3.length(Vec3.subtract(this.getHandPosition(),
|
||||
this.getOtherHandController().getHandPosition()));
|
||||
this.scalingStartDimensions = props.dimensions;
|
||||
|
|
Loading…
Reference in a new issue