Sign in to follow this  

Overlaying a sphere with selectable country boundaries

This topic is 3314 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm a beginner and don't know how to properly implement this. I need selectable countries on a world sphere. The countries might have different colors and overlays according to their game state. I will have the country boundaries as simple paths (svg or something similar)... now, how would you represent and draw them in 3d?

Share this post


Link to post
Share on other sites
That's what I thought, and I'd use a 2d representation of the borders internally, get the coordinate of the mouse on the sphere and project it respectively to see what country was 'selected'... that might work?



Share this post


Link to post
Share on other sites
I would have a 2D texture that has the countries as different solid colors.

Then when the user clicks the sphere you can transform that from the sphere's coordinates to the textures coordinates, after that check the Color of the selected pixel and see what country that corresponds to.

Share this post


Link to post
Share on other sites

This topic is 3314 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this