Words
55
Reading
1 min
Listen
Play
7y
Here is the code: https://github.com/ajayyy/Planets/blob/master/Planets-Base/src/app/ajay/planets/base/PhysicsObject.java#L54
It is the same acceleration equation, but instead of using math to integrate it and find an equation for the position, the acceleration is calculated and then added to the velocity every frame. The velocities are then added to the position every frame.
The velocity is represented as xSpeed and ySpeed.
RE: Planets | A Multiplayer Planet Gravity Game