mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 05:52:38 +02:00
Grab.js: Update Position on Mouse Grab Start
Fixes grab event issue where if the object is moving, the position does not update until the user has moved their mouse. This commit makes sure that the moment the user starts dragging on a object that isnt grabbed by another, the position is immediately updated instead of waiting for the user to move their mouse.
This commit is contained in:
parent
0347f85d3a
commit
066c517dd7
1 changed files with 4 additions and 0 deletions
|
@ -373,6 +373,10 @@ Grabber.prototype.pressEvent = function(event) {
|
|||
|
||||
beacon.updatePosition(this.startPosition);
|
||||
|
||||
if(!entityIsGrabbedByOther(this.entityID)){
|
||||
this.moveEvent(event);
|
||||
}
|
||||
|
||||
// TODO: play sounds again when we aren't leaking AudioInjector threads
|
||||
//Audio.playSound(grabSound, { position: entityProperties.position, volume: VOLUME });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue