content/hifi-content/dante/entities/OverlayGrabbing.js
2022-02-13 22:49:05 +01:00

13 lines
444 B
JavaScript

(function () {
var cubeOverlay = Overlays.addOverlay("cube", {
color: { green: 0.0, blue: 255.0, red: 0.0 },
position: Vec3.sum(MyAvatar.position, Vec3.multiply(Quat.getFront(MyAvatar.orientation), 0.5)),
isSolid: true,
dimensions: {x: 0.2, y: 0.2, z: 0.2},
grabbable: true
});
Script.scriptEnding.connect(function() {
Overlays.deleteOverlay(cubeOverlay);
});
}());