Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 Benjaben · Mar 10, 2011 at 06:33 PM · highlightonmouse

Trying to program a world globe that...

When you mouse over a particular country it'll highlight that region. I have a sphere right now with a world map texture on it that is mapped correctly. However I'm not sure how to start with highlighting different regions. I'm not talking every country every, just larger ones.

Example: When I mouse over the US I would like that portion of the texture map to turn to a slightly darkened version of the original texture map. Do I need to make multiple texture maps for each country? Or is there an easier way?

Comment
Add comment
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

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by AVividLight · Mar 10, 2011 at 07:17 PM

You can make different textures for every country that you want highlighted, and then have a ray fire from the mouse, can have the countries "tagged" or have an object in front of them so that when the ray hits the object (or tagged area) it will change textures...

-Hope I helped

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 Benjaben · Mar 10, 2011 at 08:46 PM 1
Share

Ok I think I have an idea that'll work. I'll break the sphere into multiple objects and then split the texture map into separate sections for each country and just map them individually and change the color within unity.

avatar image
0

Answer by DaveA · Mar 10, 2011 at 11:00 PM

You could have a 'hidden' map (single bitmap) where each country is a different color. Rayhit will tell you what color, hence what country. You could then muck with things to mask out all but that color and add (or whatever) to the regular map texture.

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
avatar image
0

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

The efficient way would be to use a vector/procedural approach which works by checking sphere hitpos location against a geodata database with frontiers. Then ir should create the highlight surface in 3D automatically on the fly. This approach is used by World Political Map which I encourage you to check out since it will be a great time saver for you.

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

1 Person is following this question.

avatar image

Related Questions

Illuminating a 3D object's edges OnMouseOver (script in c#)? 1 Answer

OnMouseOver with multiple colliders 1 Answer

Highlight an area of my 3D model 1 Answer

Highlighting areas of an object in contact with another? 1 Answer

4.6 New UI System, how to detect if a button is selected 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