Klickable Map segments without 3D Objekts?

Hey …
I work on a interaktive map. It’s a supporting Programm for our local Firedepartment. Anyway …

I need the segments to be clickable like Buttons. But they have some realy unusual shapes (Picture).

I tried to set a different image to a UI.Button, but the “Collision” was a rectangle.

At first i tooked the map and Build some PolyPlanes over the Map. Every segment as a different Objekt. So i was able to work witch the MeshCollider.
Go after the lines in Cinema4D was horrible …

Question:
Is there a way to make the segments interaktabel without 3D Objekts?
UI Tools? It would be a lot easier if i can draw them in Photoshop other something else …

Thank you for your Answer :slight_smile:

  1. Get all buttons the mouse cursor is currently over (buttons might overlap).
  2. iterate through them; for each one, check if the pixel the cursor is pointing at has an alpha value of 0. If not, then break the iteration and do whatever you want with that button (call a function connected to it, or something).

This of course requires using an alpha map for each button where the pixels that are outside the zone are transparent. Theoretically, this could also be done with a blak-white map since the map won’t be rendered anyway.

hmmm … i will try it! thank you.

saw this last week, maybe ask them if it would work in your case: (it has that area selection, not just individual cells)

I found a sollution. I kann place every Segment as a picture, work like this goes a lot easier in Photoshop than Cinema4D …
if you ad the 2D Mesh collider to the image you can use collider detection.