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 Carbongrip · Nov 23, 2013 at 01:32 AM · scenescalemaps

Interface Map

Hey everyone this may seem like a strange question but whats the best way of making a campaign style map that has like some planets on it that can be clicked on and interacted with like in sw:empire at war game? Not so sure how to do it… gui? or maybe make planets of smaller scale like I do in the actually battle scenes?

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

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by drak8888 · Nov 23, 2013 at 03:04 AM

Well since I never really liked GUI in Unity I'd propose making your interface in full 3D using a camera in Orthographic mode if you want more of a 2D aspect to your map. That and using 3D text next to your planet that you activate/deactivate when mousing over your planets for names/descriptions. Then loading the scene you want when you click on the planet, maybe put the scene you want to load in a public variable so you can easily change it from the editor without having to make a thousand scripts for every planet.

If you want something more optimized and less laggy though, you can make planet icons in photoshop/whatever else and put them on planes instead of making full 3D spherical planets.

Unity GUI is a bit messy when it comes to making a menu and makes you code a lot so if you want to keep it simple, make it with 3D objects, but keep the aspect ratio in mind if you're making a PC game (4:3, 16:9, different resolutions might hide some elements of your menu, make sure you design it in 4:3 so everyone can play it)

Comment
Add comment · Show 12 · 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 Carbongrip · Nov 23, 2013 at 03:46 AM 0
Share

Hmmm…anyone know what I am talking about? like this? Pic

avatar image Carbongrip · Nov 23, 2013 at 04:59 AM 0
Share

Can I use a scroll view with a bunch of buttons inside the scroll view that are images of planets that you can click that manage things? How would I place the planet buttons where I want them in the scroll view easily? I would like to stick with gui I think...

avatar image drak8888 · Nov 23, 2013 at 08:12 AM 0
Share

Oh well for that you could use GUI for the HUD and put planets in a scene that you could click on to show different things and managmenent options in your GUI, but making the WHOLE thing in GUI would just be incredibly long. If you want to scroll easily between planets, make a camera that you can move around, RTS style.

avatar image drak8888 · Nov 23, 2013 at 05:15 PM 1
Share

Yeah well sorry I went to sleep. For the labels you can either use 3dText to show the planet's specs and name or GUIText in your hud. As for the Camera, what I like to do is make an Empty GameObject at the level of the planets, then put the camera inside that gameObject. You can then move the GameObject around and the camera will keep its angle, just make sure the empty GameObject is about in the middle of where the camera is facing. You can then put clamps in your code to make sure your cam doesn't go out limits. I got a simple script I'm using for my own camera which is pretty much similar to what you want :

 var accel : float = 10;
 var scrollSpeed : float = 20;
 
 var wantedPos : Vector3 = Vector3(0,0,0);
 
 var $$anonymous$$FOV : float = 25;
 var maxFOV : float = 60;
 
 var wantedFOV : float = 60;
 
 var currentCam : Camera;

 function Start(){
 wantedPos = transform.position;
 }

 function Update () {
     // Sets the position the camera should be with the movement keys
     wantedPos += transform.right * Input.GetAxis("Horizontal") * scrollSpeed * Time.deltaTime;
     wantedPos += transform.forward * Input.GetAxis("Vertical") * scrollSpeed * Time.deltaTime;
     
     // Sets a clamp to make sure the camera doesn't go out of bounds, you might want to change the values
     if(wantedPos.x > 100){
         wantedPos.x = 100;
     }else if(wantedPos.x < -100){
         wantedPos.x = -100;
     }
     if(wantedPos.z > 100){
         wantedPos.z = 100;
     }else if(wantedPos.z < -100){
         wantedPos.z = -100;
     }
     
     // $$anonymous$$oves the camera smoothly towards the position it should be at
     transform.position = Vector3.Lerp(transform.position, wantedPos, Time.deltaTime*accel);
     
     // Sets the FOV the camera should be at, A$$anonymous$$A zoom
     wantedFOV -= Input.GetAxis ("$$anonymous$$ouse ScrollWheel")*30;
     
     // Clamps the FOV to avoid ridiculous values
     if(wantedFOV > maxFOV){
         wantedFOV = maxFOV;
     }else if( wantedFOV < $$anonymous$$FOV){
         wantedFOV = $$anonymous$$FOV;
     }
     
     // Smoothly shifts the FOV towards the value it should be at
     currentCam.fieldOfView = $$anonymous$$athf.Lerp(currentCam.fieldOfView, wantedFOV, Time.deltaTime*5);
 }

With this you can move the camera around with WASD or the arrow keys by default, if you haven't changed the axis in the Input. You can also use the scroll wheel to zoom in and out and everything moves smoothly.

avatar image drak8888 · Nov 24, 2013 at 02:01 AM 1
Share

Well you can use planes for icons, and put a texture with your icon on it just like the text.

Show more comments

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

16 People are following this question.

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

Related Questions

The scene is opposite when in play mode,The scene moves from one side to other 0 Answers

Max size of scene map 1 Answer

Obtaining a proper scale. 1 Answer

New scene after build 2 Answers

Scene is suddenly super small,Scene is suddenly super small on reload 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