mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 18:56:22 +02:00
17 lines
No EOL
497 B
JavaScript
17 lines
No EOL
497 B
JavaScript
function mousePressEvent(event) {
|
|
var overlay = Overlays.getOverlayAtPoint({
|
|
x: event.x,
|
|
y: event.y
|
|
});
|
|
// var pickRay = Camera.computePickRay(event.x, event.y);
|
|
// var intersection = Overlays.findRayIntersection(pickRay);
|
|
// print('intersection is: ' + intersection)
|
|
};
|
|
|
|
Controller.mousePressEvent.connect(function(event) {
|
|
mousePressEvent(event)
|
|
});
|
|
|
|
Script.scriptEnding.connect(function() {
|
|
Controller.mousePressEvent.disconnect(mousePressEvent);
|
|
}) |