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
0
Question by siddhu · Aug 26, 2011 at 04:15 AM · linerendererpathtrail

How to show the objects movements by line or texture?

Hi all,

I need to do the object movements and i have done it.....but now i have to show the path of the object travelled in air... how to make it??? it is possible to draw line or doing with some texture ? we have to do any script for that ? Because i have done the movements with "Lerp". now how to draw the path... any help would be appreciated....

thank you.

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

2 Replies

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

Answer by sriram90 · Sep 16, 2011 at 11:49 AM

Just use "Trail Renderer" with you projectile...it'll be under Component -> Particles -> Trail Renderer...just add the component with the movable object and you'll see the object movements.

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 siddhu · Sep 19, 2011 at 04:14 AM 0
Share

Thank You @sriram90...

avatar image
0

Answer by SilverTabby · Aug 26, 2011 at 04:55 AM

You have two built-in options to draw a line on the screen

The first is Debug.DrawLine. It's a single use function that draws one line on the screen, and only if this is a debug build (end user cannot see it). It's easy to draw a single line on the screen with no memory overhead, but It requires a bit of thought to work with, such as creating an array of points you want to draw lines between and going through it each frame.

The second is to create and use a LineRenderer. It creates a series of line in either 3d world-space or 2d screen space. It is more complex to get working at first, but after you understand how it works, it is very easy to draw complex paths though the world with a single object. This is an actual Object and will be in all builds of your project (the end user will always see it). It is an object that needs to be rendered every frame and fades from point to point if desired so it has a memory and rendering performance overhead.

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 SilverTabby · Aug 26, 2011 at 04:56 AM 0
Share

Just save the initial position of your object and the end position of your object and pass those into the functions and it should work.

avatar image siddhu · Sep 16, 2011 at 11:51 AM 0
Share

Debug.DrawLine and Pathrenderer showing the path Before the object get move. But i need to show it when the object movement through space.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

LineRenderer use to predict a path? 0 Answers

How to plot a path according to a function in scene view 1 Answer

Draw trail behind player when its not moving 0 Answers

How to add LineRenderer positions based on an Array of GameObjects 2 Answers

Drawing 2d line from a point on an object! 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