Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I calculate a conversion ratio from studs to pixels?

Asked by 6 years ago

Long story short, I need a way to present planets at a reasonable scale. If I use parts, I end up with a scale of 1 stud equals 680 km, which is just too massive for my purposes. My next thought is to use a Billboard gui and manually calculate size of the image based on the distance from the Adornee.

I have a couple questions regarding this. First off, would this concept even work? What would the math behind this look like? I understand how to scale the size of the image based on distance, but how would I determine the size the image needs to be? In other words, how do I determine a conversion ration from studs to pixels?

Any help is much appreciated,

Ion

0
you mean you want to have it look like there are planets in the sky? why are any calculations needed for that except scaling the distances down? cabbler 1942 — 6y
0
I am trying to make a space game in which players can fly around the solar system, orbit planets, etc. I need to ensure that I have an appropriate scale, so that my spaceships do not look disproportionately large. I need a way to calculate the maximum size of the image so that I can scale it down correctly at various distances. iondriver 0 — 6y

Answer this question