Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 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 /
This question was closed Mar 23, 2019 at 08:14 AM by Pulsar12 for the following reason:

Other

avatar image
0
Question by Pulsar12 · Mar 23, 2019 at 03:50 AM · positionlinerendererpicture

Add Icon and Distance (for LineRenderer) like google map

Hello, I was wondering if it was possible to display a navigation icon for my start and end point on my LineRenderer as Google map? I would like to actually display the distance (which I already have) above my LineRenderer and display the arrival icon as on google. Do you have an idea for this, please?

alt text

Here is my application that goes from point A to point B using Linerenderer and passing on '' WayPoint '' objects placed in my streets: alt text

ss.png (17.7 kB)
sss.png (354.9 kB)
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

  • Sort: 
avatar image
0

Answer by toddisarockstar · Mar 23, 2019 at 05:09 AM

if you have done all this you should have a list of points you used for the renderer. Ur math should be simple after that:

     public Vector3[] points = new Vector3[]{
         new Vector3(1,1,0),
         new Vector3(5,1,0),
         new Vector3(6,2,0),
         new Vector3(6,3,0),
         new Vector3(9,16,0),
         new Vector3(10,20,0),
         new Vector3(11,25,0),
     };
     void Start () {
 
         print ("my start icon is at " + points [0]);
         print ("my end icon is at " + points[points.Length-1]);
         print ("total distance traveled between points is :"+distancebetweenallpoints(points));
     }
 
     float distancebetweenallpoints (Vector3[] v){
         float r = 0;
         int i = v.Length;
         while (i>1) {i--;r+=Vector3.Distance(v[i],v[i-1]);}
         return r;}
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 Pulsar12 · Mar 23, 2019 at 05:14 AM 0
Share

Hey, thanks for your answer In fact, algorithm level everything is fine, I already have all the information I need. I was just wondering how I can display a speech bubble above my LineRenderer in which I would write the distance for example

Follow this Question

Answers Answers and Comments

124 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 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

Find (Get) linerenderer vertex positions 2 Answers

Line renderer positioning 2 Answers

LineRenderer position different in editor than player 0 Answers

Align game object base on 2 point 2 Answers

Set LineRenderer position at the centre of the parent after instantiate it 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