Adjust erase box position

This commit is contained in:
ericrius1 2015-10-14 10:40:55 -07:00
parent 8e21999e44
commit caacbcbe78
2 changed files with 5 additions and 2 deletions

View file

@ -58,6 +58,7 @@
this.getHandRotation = MyAvatar.getLeftPalmRotation; this.getHandRotation = MyAvatar.getLeftPalmRotation;
this.triggerAction = Controller.findAction("LEFT_HAND_CLICK"); this.triggerAction = Controller.findAction("LEFT_HAND_CLICK");
} }
Overlays.editOverlay(this.laserPointer, {visible: true});
}, },
continueFarGrabbingNonColliding: function() { continueFarGrabbingNonColliding: function() {
@ -85,7 +86,8 @@
if (this.triggerValue > PAINT_TRIGGER_THRESHOLD) { if (this.triggerValue > PAINT_TRIGGER_THRESHOLD) {
this.paint(this.intersection.intersection, this.intersection.surfaceNormal); this.paint(this.intersection.intersection, this.intersection.surfaceNormal);
} else { } else {
this.releaseGrab(); this.painting = false;
this.oldPosition = null;
} }
} }
} else { } else {
@ -167,6 +169,7 @@
releaseGrab: function() { releaseGrab: function() {
this.painting = false; this.painting = false;
Overlays.editOverlay(this.laserPointer, {visible: false});
this.oldPosition = null; this.oldPosition = null;
}, },

View file

@ -92,7 +92,7 @@ var eraseBoxDimensions = {
}; };
var eraseBoxPosition = Vec3.sum(center, Vec3.multiply(direction, whiteboardDimensions.x / 2 + eraseBoxDimensions.x / 2)); var eraseBoxPosition = Vec3.sum(center, Vec3.multiply(direction, whiteboardDimensions.x / 2 + eraseBoxDimensions.x / 2 + 0.01));
eraseBoxPosition.y += 0.3; eraseBoxPosition.y += 0.3;
scriptURL = Script.resolvePath("eraseBoardEntityScript.js"); scriptURL = Script.resolvePath("eraseBoardEntityScript.js");
var eraseAllText = Entities.addEntity({ var eraseAllText = Entities.addEntity({