Menu Z-priority


I’ve added a geometry as a floor to my scene, with a click-listener, now when activating a menu, this click-listener has priority, so I cannot press buttons on the menu.

1: Is there a way to set priority for menues (so that they precede any other listeners)
2: Is there a way to get world-coordinates (or spatial-relation coordinates) from the click-event?

Is the menu in the guiNode? The guiNode stuff always takes priority.

What kind of listener have you used? A MouseListener or a CursorListener?

The menu is attached to the guiNode (from the

protected void enable() {
Main main = (Main)getApplication();

The listeners attached to the floor is:

private void addClickListener(Geometry geom) {
new DefaultMouseListener() {
protected void click(MouseButtonEvent event, Spatial target, Spatial capture) {
System.out.println(event.getX() + “”+ event.getY());

The guiNode should always receive mouse events before the 3D scene so something else is wrong with that part.

As to your other question, if you use CursorEventControl, etc. instead of MouseEventControl then you get events that have the intersection data in them.

Weird, i’ll have to dig into it then.

Thanks. I’ll try the CursorEventControl