Laser pointers on overlays fix

Laser pointers were being rendered below the overlays. Now the behavior is correct.
This commit is contained in:
ksuprynowicz 2023-06-27 20:38:49 +02:00
parent 092cb8a572
commit 0ffe05a7c5

View file

@ -20,6 +20,10 @@
Script.include("/~/system/libraries/controllerDispatcherUtils.js"); Script.include("/~/system/libraries/controllerDispatcherUtils.js");
var Pointer = function(hudLayer, pickType, pointerData) { var Pointer = function(hudLayer, pickType, pointerData) {
this.renderLayer = "front";
if (hudLayer) {
this.renderLayer = "hud";
}
this.SEARCH_SPHERE_SIZE = 0.0132; this.SEARCH_SPHERE_SIZE = 0.0132;
this.dim = {x: this.SEARCH_SPHERE_SIZE, y: this.SEARCH_SPHERE_SIZE, z: this.SEARCH_SPHERE_SIZE}; this.dim = {x: this.SEARCH_SPHERE_SIZE, y: this.SEARCH_SPHERE_SIZE, z: this.SEARCH_SPHERE_SIZE};
this.halfPath = { this.halfPath = {
@ -31,9 +35,7 @@ var Pointer = function(hudLayer, pickType, pointerData) {
glow: true, glow: true,
faceCamera: true, faceCamera: true,
ignorePickIntersection: true, // always ignore this ignorePickIntersection: true, // always ignore this
//V8TODO renderLayer: this.renderLayer,
drawInFront: !hudLayer, // Even when buried inside of something, show it.
drawHUDLayer: hudLayer,
}; };
this.halfEnd = { this.halfEnd = {
type: "Sphere", type: "Sphere",
@ -42,8 +44,7 @@ var Pointer = function(hudLayer, pickType, pointerData) {
color: COLORS_GRAB_SEARCHING_HALF_SQUEEZE, color: COLORS_GRAB_SEARCHING_HALF_SQUEEZE,
alpha: 0.9, alpha: 0.9,
ignorePickIntersection: true, ignorePickIntersection: true,
drawInFront: !hudLayer, // Even when buried inside of something, show it. renderLayer: this.renderLayer,
drawHUDLayer: hudLayer,
visible: true visible: true
}; };
this.fullPath = { this.fullPath = {
@ -55,8 +56,7 @@ var Pointer = function(hudLayer, pickType, pointerData) {
glow: true, glow: true,
faceCamera: true, faceCamera: true,
ignorePickIntersection: true, // always ignore this ignorePickIntersection: true, // always ignore this
drawInFront: !hudLayer, // Even when buried inside of something, show it. renderLayer: this.renderLayer,
drawHUDLayer: hudLayer,
}; };
this.fullEnd = { this.fullEnd = {
type: "Sphere", type: "Sphere",
@ -65,8 +65,7 @@ var Pointer = function(hudLayer, pickType, pointerData) {
color: COLORS_GRAB_SEARCHING_FULL_SQUEEZE, color: COLORS_GRAB_SEARCHING_FULL_SQUEEZE,
alpha: 0.9, alpha: 0.9,
ignorePickIntersection: true, ignorePickIntersection: true,
drawInFront: !hudLayer, // Even when buried inside of something, show it. renderLayer: this.renderLayer,
drawHUDLayer: hudLayer,
visible: true visible: true
}; };
this.holdPath = { this.holdPath = {
@ -78,8 +77,7 @@ var Pointer = function(hudLayer, pickType, pointerData) {
glow: true, glow: true,
faceCamera: true, faceCamera: true,
ignorePickIntersection: true, // always ignore this ignorePickIntersection: true, // always ignore this
drawInFront: !hudLayer, // Even when buried inside of something, show it. renderLayer: this.renderLayer,
drawHUDLayer: hudLayer,
}; };
this.renderStates = [ this.renderStates = [