mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 20:31:29 +02:00
Merge pull request #8298 from imgntn/lazzzers
Update hand controller laser colors
This commit is contained in:
commit
1802f8e7a2
2 changed files with 253 additions and 436 deletions
File diff suppressed because it is too large
Load diff
|
@ -45,6 +45,19 @@ var TARGET_MODEL_DIMENSIONS = {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
var COLORS_TELEPORT_CAN_TELEPORT = {
|
||||||
|
red: 97,
|
||||||
|
green: 247,
|
||||||
|
blue: 255
|
||||||
|
}
|
||||||
|
|
||||||
|
var COLORS_TELEPORT_CANNOT_TELEPORT = {
|
||||||
|
red: 0,
|
||||||
|
green: 121,
|
||||||
|
blue: 141
|
||||||
|
};
|
||||||
|
|
||||||
function ThumbPad(hand) {
|
function ThumbPad(hand) {
|
||||||
this.hand = hand;
|
this.hand = hand;
|
||||||
var _thisPad = this;
|
var _thisPad = this;
|
||||||
|
@ -269,17 +282,13 @@ function Teleporter() {
|
||||||
|
|
||||||
this.rightPickRay = rightPickRay;
|
this.rightPickRay = rightPickRay;
|
||||||
|
|
||||||
var location = Vec3.sum(rightPickRay.origin, Vec3.multiply(rightPickRay.direction, 500));
|
var location = Vec3.sum(rightPickRay.origin, Vec3.multiply(rightPickRay.direction, 50));
|
||||||
|
|
||||||
|
|
||||||
var rightIntersection = Entities.findRayIntersection(teleporter.rightPickRay, true, [], [this.targetEntity]);
|
var rightIntersection = Entities.findRayIntersection(teleporter.rightPickRay, true, [], [this.targetEntity]);
|
||||||
|
|
||||||
if (rightIntersection.intersects) {
|
if (rightIntersection.intersects) {
|
||||||
this.rightLineOn(rightPickRay.origin, rightIntersection.intersection, {
|
this.rightLineOn(rightPickRay.origin, rightIntersection.intersection, COLORS_TELEPORT_CAN_TELEPORT);
|
||||||
red: 7,
|
|
||||||
green: 36,
|
|
||||||
blue: 44
|
|
||||||
});
|
|
||||||
if (this.targetOverlay !== null) {
|
if (this.targetOverlay !== null) {
|
||||||
this.updateTargetOverlay(rightIntersection);
|
this.updateTargetOverlay(rightIntersection);
|
||||||
} else {
|
} else {
|
||||||
|
@ -289,11 +298,7 @@ function Teleporter() {
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.deleteTargetOverlay();
|
this.deleteTargetOverlay();
|
||||||
this.rightLineOn(rightPickRay.origin, location, {
|
this.rightLineOn(rightPickRay.origin, location, COLORS_TELEPORT_CANNOT_TELEPORT);
|
||||||
red: 7,
|
|
||||||
green: 36,
|
|
||||||
blue: 44
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,18 +323,14 @@ function Teleporter() {
|
||||||
|
|
||||||
this.leftPickRay = leftPickRay;
|
this.leftPickRay = leftPickRay;
|
||||||
|
|
||||||
var location = Vec3.sum(MyAvatar.position, Vec3.multiply(leftPickRay.direction, 500));
|
var location = Vec3.sum(MyAvatar.position, Vec3.multiply(leftPickRay.direction, 50));
|
||||||
|
|
||||||
|
|
||||||
var leftIntersection = Entities.findRayIntersection(teleporter.leftPickRay, true, [], [this.targetEntity]);
|
var leftIntersection = Entities.findRayIntersection(teleporter.leftPickRay, true, [], [this.targetEntity]);
|
||||||
|
|
||||||
if (leftIntersection.intersects) {
|
if (leftIntersection.intersects) {
|
||||||
|
|
||||||
this.leftLineOn(leftPickRay.origin, leftIntersection.intersection, {
|
this.leftLineOn(leftPickRay.origin, leftIntersection.intersection, COLORS_TELEPORT_CAN_TELEPORT);
|
||||||
red: 7,
|
|
||||||
green: 36,
|
|
||||||
blue: 44
|
|
||||||
});
|
|
||||||
if (this.targetOverlay !== null) {
|
if (this.targetOverlay !== null) {
|
||||||
this.updateTargetOverlay(leftIntersection);
|
this.updateTargetOverlay(leftIntersection);
|
||||||
} else {
|
} else {
|
||||||
|
@ -339,13 +340,8 @@ function Teleporter() {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
this.deleteTargetOverlay();
|
this.deleteTargetOverlay();
|
||||||
this.leftLineOn(leftPickRay.origin, location, {
|
this.leftLineOn(leftPickRay.origin, location, COLORS_TELEPORT_CANNOT_TELEPORT);
|
||||||
red: 7,
|
|
||||||
green: 36,
|
|
||||||
blue: 44
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -622,4 +618,4 @@ function cleanup() {
|
||||||
if (teleporter.updateConnected !== null) {
|
if (teleporter.updateConnected !== null) {
|
||||||
Script.update.disconnect(teleporter.update);
|
Script.update.disconnect(teleporter.update);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue