content/hifi-content/rebecca/testing_utils/test.js
2022-02-14 02:04:11 +01:00

13 lines
No EOL
455 B
JavaScript

var overlay = Overlays.addOverlay("cube", {
position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })),
rotation: MyAvatar.orientation,
dimensions: { x: 0.3, y: 0.3, z: 0.3 },
solid: true
});
print("My overlay: " + overlay);
Overlays.mousePressOnOverlay.connect(function(overlayID, event) {
if (overlayID === overlay) {
print("Clicked on my overlay");
}
});