- Home /
Is there a way to have very large mass
I'm trying to make a gravity simulator to model the earth and moon. My problem is the max weight is 1e+9 while I need about 6e+24.
$$anonymous$$ass! I came here to see what you meant about a large volume of trashy objects.
Basically, no. You are not making a real, scientific quality simulation using PhysX, you're making a game in Unity, where what 'looks right' is right. Also, it isn't weight. It's mass. There's a difference.
You can still accomplish the basic notion of what you're interested in, but it requires you scale the values and time to suit the parameter limits of PhysX.
Fun physics fact: everything works as long as you use consistent units and scale the constants appropriately.
When you're moving the planets around, it may be convenient to use units of, say, 10^21 grams. As long as you scale everything else (including constants) right, you should have no problem.
By the way, nothing about orbital trajectory depends on the mass of the orbiting body. The proof is left as an exercise to the reader.
I should probably note that if you're ignoring a lot of physics (such as angular stuff, friction, etc.) you can write your own physics engine that's more suited to your needs.
Frontier Developments hired a physics Ph.D who happened to also write code to do their planetary motion engine for Elite: Dangerous. Very cool stuff.
Your answer
Follow this Question
Related Questions
Bounce rigidbody backwards without knowing its rotation 1 Answer
RigidBody 2D x velocity function 1 Answer
How to calculate desire angular velocity? 1 Answer
Calculating force 1 Answer