13 lines
No EOL
455 B
JavaScript
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");
|
|
}
|
|
}); |