This plugin has two main contributions: it enables JS mouse event listeners, and it implements the ThreeJS raycaster function.


The event listeners trigger RPM events. Change the plugin parameters and edit the system events accordingly. The events are to be set up as follows:

Single click: returns screen x (number), screen y (number) and button (number: 0 is left, 1 is middle, 2 is right);

Double click: returns screen x (number) and screen y (number). Only works for left button.

Button down: returns screen x (number), screen y (number) and button (number: 0 is left, 1 is middle, 2 is right);

Button up: returns screen x (number), screen y (number) and button (number: 0 is left, 1 is middle, 2 is right);

Mouse move: returns screen x (number) and screen y (number).

Mouse wheel: returns direction (switch: ON is down, OFF is up). Also works for notebook touchpad.


The raycaster function returns the map object at a given screen coordinate. To get the object under the cursor, set up a mouse event and call the raycaster function with the returned properties. To get the properties value, they must be set as “anything” in the event trigger options.


This plugin is somewhat complex and was implemented for programmers who have some experience in JS and who know how to properly set event triggers in RPM. If you don’t know JS, I recommend you learn it before experimenting with this plugin. More info can be found here: https://www.w3schools.com/jsref/obj_mouseevent.asp


Author: RussoDaFederal

Categories: Plugin