mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 18:16:45 +02:00
Can't resize if objects in both hands, avatar resize is seek + grips
This commit is contained in:
parent
9370c8af6b
commit
14c867fdbd
1 changed files with 4 additions and 4 deletions
|
@ -773,8 +773,8 @@ function MyController(hand) {
|
||||||
|
|
||||||
this.updateSmoothedTrigger();
|
this.updateSmoothedTrigger();
|
||||||
|
|
||||||
// If both grip buttons squeezed and nothing is held, rescale my avatar!
|
// If both trigger and grip buttons squeezed and nothing is held, rescale my avatar!
|
||||||
if (this.hand === RIGHT_HAND && this.state === STATE_OFF && this.getOtherHandController().state === STATE_OFF) {
|
if (this.hand === RIGHT_HAND && this.state === STATE_SEARCHING && this.getOtherHandController().state === STATE_SEARCHING) {
|
||||||
this.maybeScaleMyAvatar();
|
this.maybeScaleMyAvatar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2191,8 +2191,8 @@ function MyController(hand) {
|
||||||
|
|
||||||
this.maybeScale = function(props) {
|
this.maybeScale = function(props) {
|
||||||
if (!this.shouldScale) {
|
if (!this.shouldScale) {
|
||||||
// If both secondary triggers squeezed, start scaling
|
// If both secondary triggers squeezed, and the non-holding hand is empty, start scaling
|
||||||
if (this.secondarySqueezed() && this.getOtherHandController().secondarySqueezed()) {
|
if (this.secondarySqueezed() && this.getOtherHandController().secondarySqueezed() && this.getOtherHandController().state === STATE_OFF) {
|
||||||
this.scalingStartDistance = Vec3.length(Vec3.subtract(this.getHandPosition(), this.getOtherHandController().getHandPosition()));
|
this.scalingStartDistance = Vec3.length(Vec3.subtract(this.getHandPosition(), this.getOtherHandController().getHandPosition()));
|
||||||
this.scalingStartDimensions = props.dimensions;
|
this.scalingStartDimensions = props.dimensions;
|
||||||
this.shouldScale = true;
|
this.shouldScale = true;
|
||||||
|
|
Loading…
Reference in a new issue