mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 03:58:07 +02:00
Fix 'releaseGrab' not being called when using grip buttons
This commit is contained in:
parent
881e0cba11
commit
aa1e813d72
1 changed files with 3 additions and 2 deletions
|
@ -2047,8 +2047,6 @@ function MyController(hand) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dropDetected && !this.waitForTriggerRelease && this.triggerSmoothedGrab()) {
|
if (dropDetected && !this.waitForTriggerRelease && this.triggerSmoothedGrab()) {
|
||||||
this.callEntityMethodOnGrabbed("releaseEquip");
|
|
||||||
|
|
||||||
// store the offset attach points into preferences.
|
// store the offset attach points into preferences.
|
||||||
if (USE_ATTACH_POINT_SETTINGS && this.grabbedHotspot && this.grabbedEntity) {
|
if (USE_ATTACH_POINT_SETTINGS && this.grabbedHotspot && this.grabbedEntity) {
|
||||||
var prefprops = Entities.getEntityProperties(this.grabbedEntity, ["localPosition", "localRotation"]);
|
var prefprops = Entities.getEntityProperties(this.grabbedEntity, ["localPosition", "localRotation"]);
|
||||||
|
@ -2344,6 +2342,9 @@ function MyController(hand) {
|
||||||
|
|
||||||
var noVelocity = false;
|
var noVelocity = false;
|
||||||
if (this.grabbedEntity !== null) {
|
if (this.grabbedEntity !== null) {
|
||||||
|
if (this.state === STATE_HOLD) {
|
||||||
|
this.callEntityMethodOnGrabbed("releaseEquip");
|
||||||
|
}
|
||||||
|
|
||||||
// Make a small release haptic pulse if we really were holding something
|
// Make a small release haptic pulse if we really were holding something
|
||||||
Controller.triggerHapticPulse(HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, this.hand);
|
Controller.triggerHapticPulse(HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, this.hand);
|
||||||
|
|
Loading…
Reference in a new issue