mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 02:23:57 +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 grabbableData = getEntityCustomData(GRABBABLE_DATA_KEY, this.grabbedEntity, DEFAULT_GRABBABLE_DATA);
|
||||
|
||||
if (this.state == STATE_CONTINUE_DISTANCE_HOLDING && this.bumperSqueezed() &&
|
||||
typeof grabbableData.spatialKey !== 'undefined') {
|
||||
if (this.state == STATE_CONTINUE_DISTANCE_HOLDING && this.bumperSqueezed()) {
|
||||
var saveGrabbedID = this.grabbedEntity;
|
||||
this.release();
|
||||
this.setState(STATE_EQUIP);
|
||||
this.grabbedEntity = saveGrabbedID;
|
||||
|
||||
if (typeof grabbableData.spatialKey === 'undefined') {
|
||||
Entities.editEntity(this.grabbedEntity, {position: handPosition});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue