mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
fix when releaseGrab is called
This commit is contained in:
parent
5db3af3f4c
commit
236831d385
1 changed files with 1 additions and 1 deletions
|
@ -380,6 +380,7 @@ function controller(hand, triggerAction) {
|
|||
|
||||
if (this.grabbedEntity != null && this.actionID != null) {
|
||||
Entities.deleteAction(this.grabbedEntity, this.actionID);
|
||||
Entities.callEntityMethod(this.grabbedEntity, "releaseGrab");
|
||||
}
|
||||
|
||||
// the action will tend to quickly bring an object's velocity to zero. now that
|
||||
|
@ -387,7 +388,6 @@ function controller(hand, triggerAction) {
|
|||
Entities.editEntity(this.grabbedEntity,
|
||||
{velocity: Vec3.multiply(this.grabbedVelocity, RELEASE_VELOCITY_MULTIPLIER)}
|
||||
);
|
||||
Entities.callEntityMethod(this.grabbedEntity, "releaseGrab");
|
||||
this.deactivateEntity(this.grabbedEntity);
|
||||
|
||||
this.grabbedVelocity = ZERO_VEC;
|
||||
|
|
Loading…
Reference in a new issue