This commit is contained in:
@@ -8,7 +8,7 @@ class Draggable{
|
||||
let dragging = null;
|
||||
this.add = function(object, dragZone, fn, distance){
|
||||
objects.push(object);
|
||||
object._draggable = {fn, dragZone, distance: distance || defaultDistance}
|
||||
object._draggable = {fn, dragZone, distance: (distance || defaultDistance) * engine.scale}
|
||||
}
|
||||
|
||||
this.remove = function(object){
|
||||
@@ -38,7 +38,7 @@ class Draggable{
|
||||
return true;
|
||||
}).forEach(o=>{
|
||||
o.getWorldPosition(v);
|
||||
if (cv.distanceTo(v) <= o._draggable.distance / engine.scale){
|
||||
if (cv.distanceTo(v) <= o._draggable.distance){
|
||||
const intersects = raycaster.intersectObject(o);
|
||||
if (intersects[0]) forExecute.push({o, i:intersects[0]})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user