'm' is the mass of everything, including the sun. Gravity from all objects affect all objects.
I have no tangential velocity, i just have normal velocity being affected by gravity.
I'm using the Universal Gravitational Constant.
i scaled all the masses and the Gravitational constant just a bit to try to avoid floating point error.
I imagine that could be a problem as well?
// time step is based off the time between frames float dt; const double G_Constant; Vec3 gravityAccel = (G_Constant*objMass/distSqu) * direction ; velocity -= gravityAccel * dt;