|
I'm starting with a board game in Unity like Risk, programming in C#, and I need a selectable world map to put the armies on each region and make it the game board. I have a Raycasting function to select each country but I need to know how to build the board and make the countries selectable. I have a board like this: http://2.bp.blogspot.com/-vtEHvcmS-Ac/TtHk0IvsxoI/AAAAAAAAAnw/V6e_eGfmCac/s1600/Risk+II+Game+Board.jpg And I want to be able to select the countries separately, like they're objects on their own. Do you know any ways to do that? Thanks for the help!
(comments are locked)
|
|
You could try setting a mesh collider on each individual country's shape/model (depending on how you have things set up. If you have terrain, as in the map itself is 3D, then it might be a bit more taxing, but you may want to consider it). Considering how crazy complex international border shapes can be... I'd say, other than some more advanced methods, that would be your best bet.
(comments are locked)
|

I'm confused, I have a Raycasting function to select each country , I want to be able to select the countries separately , this is a contradiction.
I was thinking you could get the colour of the pixel from the raycast to determine the country, but for the regions in the country that would be trickier (unless you had very subtle colour changes in the regions, that a get pixel would detect but the human eye wouldn't)
http://www.google.com/search?btnG=1&pws=0&q=unity+raycast+read+pixel
I just noticed this is a Duplicate Question
My bad sorry, I didn't see I posted this twice!
np, was probably stuck in the moderation que as new user, so first qn didn't show up. One of the pro's will close this