content/hifi-content/angus/overlaybugtest.js
2022-02-13 21:18:16 +01:00

21 lines
No EOL
629 B
JavaScript

function getPositionForIcon() {
var camPos = Camera.position;
var camRot = Camera.orientation;
return Vec3.sum(camPos, Vec3.multiplyQbyV(camRot, {x: 0, y: 0, z: -1}));
}
var overlayTest = Overlays.addOverlay("image3d", {
position: getPositionForIcon(),
drawInFront: true,
isFacingAvatar: true,
url: "file:///c:/angus/javascript_bak/gesture/outline.png",
alpha: 1.0,
parentID: MyAvatar.sessionUUID
});
function shutdown() {
Overlays.deleteOverlay(overlayTest);
}
Script.scriptEnding.connect(shutdown);