måndag 2 mars 2015

Watching them Eat

The final major day of our project workload.

The radius of the models now corresponds to the radius of the planet it's representing, and the collisions looks much better as a result.

Collisions may now result in one planet absorbing the other, if the smaller planet isn't moving away fast enough. We are still using elastic collisions to decide the resulting velocities, because they look more fun. The remaining planet will have the combined mass and volume of both and the velocity is determined by the preservation of momentum.

We also added camera control to the user, the camera will fixate on a planet (for now the sun) and the player can zoom and rotate around it in 3d space. We would like to add functionallity for switching fixated planet.

As a final feature the planet that the camera is fixated on (the sun) will now accelerate in the direction of the camera facing when the player holds down the space bar.
This combined with the eating of other planets introduces gameplay, where the player can attempt to devour other planets in the system.