mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 18:42:58 +02:00
Squeezing bumper while distance grabbing now brings object to your hand
This commit is contained in:
parent
5f85e0a4c0
commit
a80e77ff80
1 changed files with 5 additions and 2 deletions
|
@ -1119,12 +1119,15 @@ function MyController(hand) {
|
||||||
var grabbedProperties = Entities.getEntityProperties(this.grabbedEntity, GRABBABLE_PROPERTIES);
|
var grabbedProperties = Entities.getEntityProperties(this.grabbedEntity, GRABBABLE_PROPERTIES);
|
||||||
var grabbableData = getEntityCustomData(GRABBABLE_DATA_KEY, this.grabbedEntity, DEFAULT_GRABBABLE_DATA);
|
var grabbableData = getEntityCustomData(GRABBABLE_DATA_KEY, this.grabbedEntity, DEFAULT_GRABBABLE_DATA);
|
||||||
|
|
||||||
if (this.state == STATE_CONTINUE_DISTANCE_HOLDING && this.bumperSqueezed() &&
|
if (this.state == STATE_CONTINUE_DISTANCE_HOLDING && this.bumperSqueezed()) {
|
||||||
typeof grabbableData.spatialKey !== 'undefined') {
|
|
||||||
var saveGrabbedID = this.grabbedEntity;
|
var saveGrabbedID = this.grabbedEntity;
|
||||||
this.release();
|
this.release();
|
||||||
this.setState(STATE_EQUIP);
|
this.setState(STATE_EQUIP);
|
||||||
this.grabbedEntity = saveGrabbedID;
|
this.grabbedEntity = saveGrabbedID;
|
||||||
|
|
||||||
|
if (typeof grabbableData.spatialKey === 'undefined') {
|
||||||
|
Entities.editEntity(this.grabbedEntity, {position: handPosition});
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue