Newtonian Physics in Unity

Simple simulation of Newtons laws of motion using a custom physics engine.

Each ball is given a mass and the subsequent gravitational attraction causes them to interact.

The balls have no Rigidbody, so are able to pass through each other. If the origins cross then the maths breaks down and causes the pair to be ejected from the system.

The green lines display the thrust vector of the object.
In this case, they simply appear on the opposite side from where the gravitational force of another object is being applied.

Questions?

%d bloggers like this: