• 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
Question by wenhua · Jan 10, 2012 at 02:57 AM ·

Detect sign on Fix Mini map,When click on moving map,just like pin point

alt text" />

My Image Here : http://freeimagehosting.net/tdtv8

I am making a new function,(Silimar function to dota(warcraft) pin point on the map)now > i have scene that is split into half,left side is fix island map,where right side is for helicopter flying in the island,

Is there a way to make This>

i wanted to make it that when i mouse click on a location or an objects on the right side island map,its will display a pin point signal on the fix island map on the left side

So that we will be able to know wheres the location of the helicopter now.Can someone kindly help me with this Thx.

(For those who know dota(Warcraft))This function is similar it,like when we mouse click on the map,it will display a signal sign blinking on the mini map.

Comment
Lo0NuhtiK

People who like this

1 Show 0
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

2 Replies

· Add your reply
  • Sort: 
avatar image

Answer by Lo0NuhtiK · Jan 10, 2012 at 10:07 AM

What I think you're wanting to do would take quite a bit of stuff if you did it the only way I can think that I'd do it at the moment.

Probably a better way than this, but if I did it right now I'd use a plane object set beneath the terrain and sized out bigger than the terrain with your 2Dtexture map used on its material ; a separate camera for the minimap with it's layers and depth etc set and positioned to where all it showed was a top-down view of that plane ; then other gameObject(s) made for the map 'blips' that could be instantiated at the x/z of the raycast-hit's of the mouse click (and above the plane on the Y-axis) and set to the minimap camera layer so it could only be viewed on the map and ignored in the rest of the game. ...stuff like that. Don't know, haven't tried it, and haven't searched for anything like it.
Be even easier if you used a 3D minimap (overhead camera) of gameplay area instead of a 2d texture image for it ... basically the same, but less the extra plane and stuff.
Have you searched the forum?

Comment
BiG

People who like this

1 Show 5 · 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 wenhua · Jan 10, 2012 at 12:52 PM 0
Share

For my map i think i have a mainCamera above the Terrain,by caturing it and displaying as a fix map,so i dunno is 2D or 3D anythings lol,so this is displaying on left half of the scene.

on the right side is another camera attached to helicopter,so is half half.

on the forum i hardly see any similar to my function or i am unaward of it,think these one,but i dunno how to use it on myone,one of it is this,references>

http://answers.unity3d.com/questions/25178/mini-map-radar-screen-with-different-blips.html

avatar image wenhua · Jan 11, 2012 at 01:19 AM 0
Share

LoONuhtik you can check my Image here : http://freeimagehosting.net/tdtv8

So i want it to be when i click on right side map,the fix map on left will blink to show where am i now

avatar image Lo0NuhtiK · Jan 11, 2012 at 02:22 AM 0
Share

alt text


I didn't type the html on your other topic, just use the add-image button on the answer post thing or whatever to post your images.
Edit : oh, nevermind lol looks like you got it now :D
avatar image wenhua · Jan 11, 2012 at 05:50 AM 0
Share

yea,So after u looking at my image do you have a clearer view and now do you know what i want??or have u figure out how to solve my question?

avatar image Lo0NuhtiK · Jan 11, 2012 at 06:25 AM 0
Share

Yeah, it's basically what I figured you were trying to do, my answer remains the same though. You could do it something like what I posted, or the ways that the other minimap topics I saw you bump today describe. Those are along the same lines as what I said, sort-of I think, from what I saw skimming through them.
You just have to make it all work how you want it to.

avatar image

Answer by by0log1c · Jan 11, 2012 at 07:07 AM

Lo0Nuhtik's answer is interesting. My own first idea looked like this:

  • Setup a plane with the map texture. TopView and match it with the 3d world under it.
  • Find X,Z of all 4 plane corners. We now have an equivalent rectangle in 3d space.
  • Delete the plane. Remember all 4 X,Z positions!
  • Use GUI.DrawTexture() to draw the texture. Figure its 4 X,Y positions.
  • Make a function that takes X,Y position and if within our texture rectange, returns percentage.
  • Make a function that takes X,Y percentage position within our 3d space rectangle and return true values.

That was setting up, now for the actual "map blips":

  • When user click over the texture rectangle, get the mouse position percentage within it.
  • Convert that over to our 3d space rectangle.
  • Raycast in 3d space using our new X,Z from far up, straight down. Read hit.point Y.
  • We now have a close approximate of the 3d position relative to its texture.
  • Instantiate bleep GameObject using our X,Y and the new Y from the ray hit.point + offset .

This is only a theoric step-by-step but it could give you another work angle idea. Basically our first step is setting up 'equivalent rectangles' to switch positions between 2d and 3d using relative positioning (percentages%).

OOPS: this actually 'set waypoints in the map, display them in world' and not 'display my position on the minimap'. The concept could still be used with little modification to work the other way, and requires no additionnal camera... but yeah, it might be farfetch, its just an idea.

Comment

People who like this

0 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 wenhua · Jan 11, 2012 at 07:32 AM 0
Share

woa,acturally this not yea complete game was create by my senior and now my teacher tell me to improves on it,i am a totally new in this and having hard time understanding all this LOL.maybe i will think a easy way to do.

maybe i will create a sphere and left it on top of the map,so may i set at start the render.enable=false.so when pin point it will be true at using this GameObject.Find("Cylinder").transform.position = new Vector3( helicopter.transform.position.x, 2000, helicopter.transform.position.z);

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

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

world and local locations.. 1 Answer

Home Screen 1 Answer

Gameobject and camera detection 1 Answer

How do you assign a gameObject to an "Animator" with script? 1 Answer

Uploading Free games on steam? 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