mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
only pulse on release when held
This commit is contained in:
parent
0f7f9990c2
commit
f37570dc9a
1 changed files with 3 additions and 2 deletions
|
@ -1965,6 +1965,9 @@ function MyController(hand) {
|
|||
var noVelocity = false;
|
||||
if (this.grabbedEntity !== null) {
|
||||
|
||||
// Make a small release haptic pulse if we really were holding something
|
||||
Controller.triggerHapticPulse(HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, this.hand);
|
||||
|
||||
// If this looks like the release after adjusting something still held in the other hand, print the position
|
||||
// and rotation of the held thing to help content creators set the userData.
|
||||
var grabData = getEntityCustomData(GRAB_USER_DATA_KEY, this.grabbedEntity, {});
|
||||
|
@ -2002,8 +2005,6 @@ function MyController(hand) {
|
|||
joint: this.hand === RIGHT_HAND ? "RightHand" : "LeftHand"
|
||||
}));
|
||||
|
||||
Controller.triggerHapticPulse(HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, this.hand);
|
||||
|
||||
this.grabbedEntity = null;
|
||||
this.grabbedHotspot = null;
|
||||
|
||||
|
|
Loading…
Reference in a new issue