Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by kebin · Aug 13, 2014 at 11:15 AM · c#gameobjectprojectsphere

How to create countries objects in a Sphere?

So I have a project that is basically creating Earth. So what I did is I created a sphere, attached a texture for the water. But what I want to do with it is this: I want it to be like when i click a specific country, it'll display the cities in the country. So my problem is, how do I implement the countries? I was thinking of making them individual gameobjects per country but, how do I make them like concave/convex when I attach them to the sphere/earth? Or is there another way of doing this? please help.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Josh Naylor ♦♦ · Aug 13, 2014 at 11:16 AM 0
Share

Have you attempted anything so far that you can share? Otherwise it's a pretty wide question and would be better on the forums.

avatar image MrVerdoux · Aug 13, 2014 at 12:50 PM 0
Share

I'd go with coordinates detection in the sphere, comparing later the coordinates with a polygon map of earth's countries. You will need ray casting and the polygon map, I found it here: http://www.rjruss.info/2010/12/free-countries-of-world-in-polygon-kml.html

avatar image robertbu · Aug 13, 2014 at 03:50 PM 1
Share

Create a second image with the same aspect ratio of the earth image. Give each country (or each area you want to make clickable) a unique color. You can then use the RaycastHit.textureCoord to map into your second image and get the color.

http://answers.unity3d.com/questions/516609/empty-spaces-in-buttons-are-detected-by-mouse.html

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by LSPressWorks · Aug 13, 2014 at 03:40 PM

Create the countries(as warped planes, ie a leaf), attach them as children, position them. Tag them with country name. Then instead of a local map you're only checking to see if it's an objects tag, and possibly if the clicked pixel is transparent. This is effectively a translation of how we did our globes in class. Turned out very versatile.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image kebin · Aug 13, 2014 at 04:02 PM 0
Share

yes. But the globe has a curve right, do you know how to bend the planes? so that itll realistically look like it is a part of the globe?

avatar image
0

Answer by Kronnect · Dec 08, 2015 at 11:53 AM

Check out World Political Map on the Asset Store. It's uses a procedural/vector approach.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Best way to load high volume of particles. 1 Answer

Distribute terrain in zones 3 Answers

How to Check if a component Exists on a Gameobject. 3 Answers

C# Preserving GameObjects' Previous Meshes 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges