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 Ddarz · Dec 01, 2010 at 02:10 PM · linetrajectoryplanetsellipse

Drawing a moving objects trajectory

Hi,

I have searched high and low for an answer to my question but to now avail so here goes:

I have a project to create a solar system, that is planets rotating around a cetral sun. Nothing realistic mind you, just spheres moving around a point in random ellipses, no gravity or physics involved.

As the planet's trajectories are randomised at runtime I was hoping to draw their trajectories... Is there a simple way to do this? I have looked at gizmos, linedraw and trail functions but none of them have the functionality Im looking for:(

Any suggestions? Maybe im going about this the wrong way, Im really not very experienced at this.

Many thanks

cheers!

Comment
Add comment · Show 1
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 Eric5h5 · Dec 01, 2010 at 03:51 PM 0
Share

What functionality are you looking for? You haven't actually described what you want.

4 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Tuti · Dec 01, 2010 at 06:08 PM

I would put a "fake" and invisible planet moving faster than the actual ones. Then you assign a "Trail Renderer" particle system. They would draw a path that you are looking for.

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 overunity3d · Sep 24, 2011 at 07:28 PM 0
Share

Tuti answer would be the lightest performance one.

avatar image syclamoth · Sep 25, 2011 at 02:08 PM 0
Share

Not so much 'faster', but in front of the others. Not so sure about the performance issue though. Also, Necromancy.

avatar image
1

Answer by Mike 12 · Dec 01, 2010 at 10:54 PM

TrailRenderer wouldn't do the trick for you? It'd be easier for people to help you if you told us what kind of functionality that you were looking for. Because, there are ways to go about drawing the trajectory of an object in Unity that you might like.

If you want the trajectory to be drawn after the object has passed that point, then you could just attach a TrailRenderer to our planet. However, if you want to draw the trajectory from the beginning, then I suggest that you store your trajectory in an array and implement your trajectory line as a LineRenderer object.

Comment
Add comment · 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
0

Answer by Bob5602 · Dec 01, 2010 at 02:34 PM

Do you need the trajectories completely, or just a trail after the spheres as they move? If its just the trail, I could suggest using some sort of particle emitter on the spheres to leave little specks as it moves, creating a trail with the traveled trajectory.

Comment
Add comment · 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
0

Answer by Rennat · Dec 01, 2010 at 05:59 PM

I might approach this problem by creating a ring texture with an additive particle shader, placing it on a plane and then aligning/scaling that plane to match the orbit of the planet. (Depending on the screen size of the orbit this may or may not look good)

Or you could create a circle using short LineRenderers

Or if you set a TrailRenderer's duration to the same period of time as a planet's "year" then set the trail not to fade out (full alpha in the colors) then it should simulate this after the first orbit.

Comment
Add comment · 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

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

2 People are following this question.

avatar image avatar image

Related Questions

Help with SlingShot trajectory... 1 Answer

Lines or curves for a smooth circle in Vectrosity 2 Answers

line disappears when exiting from fullscreen mode 0 Answers

tiling texture on multiple planes 1 Answer

Really Simple: Debug.DrawLine just will not show up 6 Answers


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