Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
1
Question by Reedex · May 13, 2019 at 12:37 PM · mapwaypoint

Image as a map, clicking on it spawns Gameobject in the scene at that position.

I'd like to implement map with settable waypoints by clickin somewhere on the map and spawning GO at that location. Ideas appreciated. I have compass it only needs a target to point to. someone pointed out getting xy of image and converting it to xy of world but the map is not rectangle its teared paper so i guess no go ? : ) thanks J

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
0

Answer by tormentoarmagedoom · May 13, 2019 at 02:12 PM

Hello. I don't know if there is any way faster o more simple, but this works, i did it a lot of times. Follow the logic...:


  • If you have 2 empty objects, with exactly same transform. Lets call them MapFrame1 and MapFrame2.

  • Then, each MapFrame have as a child the map itself, the real map (called Map1 and Map2), also with same transform properties.

  • Then you scale MapFrame1 to (0.1f ,0.1f, 0.1f)

  • If you perform a raycast in the Mapframe1, detect the hit, create a emtyobject (called for example PositionDetector) in that worldposition.

  • Then make this PositionDetector child of MapFrame1....

  • Create an EmptyObject (Called PositionFinder) as a child of MapFrame2.

  • And Finally:

     PositionFinder.transform.localPosition = PositionDetector.transform.localPosition
    
    

Both Objects (PositionFinder & PositionDetector) will be in same place relative to the map. So you can use this PositionFinder as a reference to spwan what you really want.

Bye ! :D

Comment
Add comment · Show 2 · 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 tormentoarmagedoom · May 13, 2019 at 02:13 PM 1
Share

PS: You should make the $$anonymous$$ini$$anonymous$$ap a mesh, (i never tried with an image, i dont know if works the same as a mesh...

avatar image Reedex · May 14, 2019 at 01:27 PM 0
Share

uf, i am sorry but,... hhh, (i'm gonna number your dot statements) 1) empty objects as in , regular empty Go's ? not part of canvas or anything? 2) what is the "map itself" and what is "real map". i'm afraid i don't understand a word . :) hah p.s. what $$anonymous$$imap, i dont have one . just for clarity though

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

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

Related Questions

Grand theft auto - Map Waypoint 1 Answer

Assigning UV Map to model at runtime 0 Answers

how to create a waypoint? 2 Answers

Help with a simple AI 2 Answers

Waypoint system: loop and back-forth operations 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