Jump to content

[Answered] Distance between vessel and CelestialBody


Recommended Posts

The scale is 1 unit : 1 meter

That function is also probably just:

(v.transform.position - b.transform.position).magnitude

which is more useful if you also need the direction vector for something

Link to comment
Share on other sites

That will return the distance from the center of the body, if you care. You'll need to subtract the radius if you want the distance from the surface, and if you need really accurate numbers you'll need to get the terrain height.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...