+4 votes

I'm working on a project that's essentially Scrabble.
I've got a main board that should be able to scroll, and a fixed 'tray' of tiles at the bottom of the screen.
The way I have it set up is with a VBoxContainer, and two ViewportContainers containing a viewport into the board and the tray. Both of those are tileMaps. The actual game pieces are added as children of the tile maps. When I run the game piece scene, dragging via Area2Dmouseenter/exit works fine, but not when the tiles are part of the main scene.

I've set up mouse ignore on all of the containers, and I've tested with logging on each of those levels of containers to make sure the mouse events are getting down that low.

At this point though, it looks like the viewport is dropping the mouse events, and so the game pieces that are under the viewport don't appear to get any mouse events at all.

Any help would be much appreciated.

My main game board scene

in Engine by (16 points)

Looks like this issue

If is that, try one of the workarounds mentioned there.

That appears to be the issue I'm having, but as they've said in the issue, the workarounds didn't really work for my case. Thanks for tracking that down though.

I've decided to approach this a different way, and have the tiles added above those viewports. I'll probably just need to set the z-index of the tray container to be above everything else on the Board layer. Thanks again!

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.