use new-style hand-lasers for both hands

This commit is contained in:
Seth Alves 2017-03-02 10:01:08 -08:00
parent 7f6b803652
commit 93055a67a8

View file

@ -1001,9 +1001,7 @@ function MyController(hand) {
this.overlayLineOn = function(closePoint, farPoint, color, farParentID) {
if (this.overlayLine === null) {
var lineProperties;
if (this.hand === RIGHT_HAND) {
lineProperties = {
var lineProperties = {
glow: 1.0,
lineWidth: 5,
start: closePoint,
@ -1017,23 +1015,9 @@ function MyController(hand) {
parentJointIndex: this.controllerJointIndex,
endParentID: farParentID
};
} else {
lineProperties = {
glow: 1.0,
lineWidth: 5,
start: closePoint,
end: farPoint,
color: color,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
visible: true,
alpha: 1,
};
}
this.overlayLine = Overlays.addOverlay("line3d", lineProperties);
} else {
if (this.hand === RIGHT_HAND) {
if (farParentID && farParentID != NULL_UUID) {
Overlays.editOverlay(this.overlayLine, {
color: color,
@ -1044,13 +1028,6 @@ function MyController(hand) {
color: color,
});
}
} else {
Overlays.editOverlay(this.overlayLine, {
start: closePoint,
end: farPoint,
color: color,
});
}
}
};