RE: RE: Planets | A Multiplayer Planet Gravity Game
You are viewing a single comment's thread from:

RE: Planets | A Multiplayer Planet Gravity Game

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.

@ajayyy: Here is the code: | Ecency