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:
Menithal 2016-03-18 08:59:07 +02:00
parent 0347f85d3a
commit 066c517dd7

View file

@ -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 });
}