Change equip-hotspot to a green sphere.

This commit is contained in:
Anthony J. Thibault 2016-06-01 16:54:14 -07:00
parent c9f440a49d
commit 6d462a477d

View file

@ -897,28 +897,26 @@ function MyController(hand) {
var hotspotPos = grabProps.position; var hotspotPos = grabProps.position;
// does this entity have an equip point? // does this entity have an attach point?
var wearableData = getEntityCustomData("wearable", entities[i], undefined); var wearableData = getEntityCustomData("wearable", entities[i], undefined);
if (wearableData) { if (wearableData) {
var handJointName = this.hand === RIGHT_HAND ? "RightHand" : "LeftHand"; var handJointName = this.hand === RIGHT_HAND ? "RightHand" : "LeftHand";
if (wearableData[handJointName]) { if (wearableData[handJointName]) {
// draw the hotspot around the equip point. // draw the hotspot around the attach point.
hotspotPos = wearableData[handJointName][0]; hotspotPos = wearableData[handJointName][0];
} }
} }
// draw a hotspot! // draw a hotspot!
this.equipHotspotOverlays.push(Overlays.addOverlay("cube", { this.equipHotspotOverlays.push(Overlays.addOverlay("sphere", {
position: hotspotPos, position: hotspotPos,
size: 0.1, size: 0.2,
color: { red: 90, green: 255, blue: 90 }, color: { red: 90, green: 255, blue: 90 },
alpha: 1, alpha: 0.7,
solid: false, solid: true,
visible: true, visible: true,
dashed: false, ignoreRayIntersection: false,
lineWidth: 2.0, drawInFront: false
ignoreRayIntersection: true, // this never ray intersects
drawInFront: true
})); }));
} }
} }