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 Cocoss · Mar 13, 2014 at 11:42 PM · orbitdrawtrajectoryship

Draw an orbital trajectory of a ship

Hi guys i'm working on a game in which it will be possible to take a spaceship to go between differents planets. I already have a Sun with some planets turning around with a simple script :

 #pragma strict
 
     var rotation : Quaternion;
     var radius = Vector3(5,0,0);
     var degrees:float = 10;
     var moonCurrentRotation = 0.0;
     var planete : GameObject;
      
     
     function Update(){
     
     moonCurrentRotation += degrees*Time.deltaTime;
     rotation.eulerAngles = Vector3(0, moonCurrentRotation, 0);
     
     transform.rotation.eulerAngles = Vector3(0, moonCurrentRotation*30, 0);
     transform.position = rotation * radius + planete.transform.position;
     
     
     }

I have an other script which implement circular gravity so i can walk on the planet, take of, make an orbit and go to the moon (on foot ^^). So my problem is to draw the trajectory line of my ship where we can find the apoapsis and periapsis. In fact i would like to make something similar as you can see in Kerbal Space Program. I'm a beginner and i don't know what to do at first. I know a little bit mechanics but i don't know how i can use it for tracing a trajectory.

Thanks in advance for answers and excuse me for my english i'm french ^^.

Comment
Add comment · Show 3
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 · Mar 14, 2014 at 12:03 AM 0
Share

$$anonymous$$SP uses Vectrosity.

avatar image Cocoss · Mar 15, 2014 at 06:25 PM 0
Share

Thanks for the answer !

Is there free solutions to make something similar without using vectrosity ? The most important for me is to make the possibility for the player to make manual space flying at his own risks, and an automatic secure fast flying mode. The trajectories would be implemented in the player's radar and would be used just for the free mode. Automatic mode would be used for fastest travels ; i don't want to make a "wrap time" mode like $$anonymous$$SP. I just want to make an adventure game and not a simulation.

avatar image getyour411 · Mar 15, 2014 at 06:27 PM 0
Share

Please don't post a comment/follow up/thank you as ANOTHER answer as you did here, I changed this one for you.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by le_duke · Mar 15, 2014 at 10:00 PM

I think that this is gonna help you ;) : http://docs.unity3d.com/Documentation/Components/class-LineRenderer.html

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

22 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

Related Questions

how to DrawPath Trajectory Like below game Reference 0 Answers

How to predict orbit based on time? 1 Answer

How will I draw a curve that represents the trajectory of a projectile? 1 Answer

Aim preview for projectile trajectory 1 Answer

Simulating 2D planetary gravity and trajectpry using Unity 0 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