mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 16:58:09 +02:00
Fix for equip-hotspot being visible for whiteboard markers
This commit is contained in:
parent
2ed88bca6d
commit
972c292857
1 changed files with 16 additions and 21 deletions
|
@ -879,28 +879,23 @@ function MyController(hand) {
|
||||||
var entities = Entities.findEntities(MyAvatar.position, HOTSPOT_DRAW_DISTANCE);
|
var entities = Entities.findEntities(MyAvatar.position, HOTSPOT_DRAW_DISTANCE);
|
||||||
var i, l = entities.length;
|
var i, l = entities.length;
|
||||||
for (i = 0; i < l; i++) {
|
for (i = 0; i < l; i++) {
|
||||||
|
|
||||||
// is this entity equipable?
|
|
||||||
var grabData = getEntityCustomData(GRABBABLE_DATA_KEY, entities[i], undefined);
|
|
||||||
var grabProps = Entities.getEntityProperties(entities[i], GRABBABLE_PROPERTIES);
|
var grabProps = Entities.getEntityProperties(entities[i], GRABBABLE_PROPERTIES);
|
||||||
if (grabData) {
|
// does this entity have an attach point?
|
||||||
// does this entity have an attach point?
|
var wearableData = getEntityCustomData("wearable", entities[i], undefined);
|
||||||
var wearableData = getEntityCustomData("wearable", entities[i], undefined);
|
if (wearableData && wearableData.joints) {
|
||||||
if (wearableData && wearableData.joints) {
|
var handJointName = this.hand === RIGHT_HAND ? "RightHand" : "LeftHand";
|
||||||
var handJointName = this.hand === RIGHT_HAND ? "RightHand" : "LeftHand";
|
if (wearableData.joints[handJointName]) {
|
||||||
if (wearableData.joints[handJointName]) {
|
// draw the hotspot
|
||||||
// draw the hotspot
|
this.equipHotspotOverlays.push(Overlays.addOverlay("sphere", {
|
||||||
this.equipHotspotOverlays.push(Overlays.addOverlay("sphere", {
|
position: grabProps.position,
|
||||||
position: grabProps.position,
|
size: 0.2,
|
||||||
size: 0.2,
|
color: { red: 90, green: 255, blue: 90 },
|
||||||
color: { red: 90, green: 255, blue: 90 },
|
alpha: 0.7,
|
||||||
alpha: 0.7,
|
solid: true,
|
||||||
solid: true,
|
visible: true,
|
||||||
visible: true,
|
ignoreRayIntersection: false,
|
||||||
ignoreRayIntersection: false,
|
drawInFront: false
|
||||||
drawInFront: false
|
}));
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue