physics

From Irrlicht mesh to Bullet Physics mesh

There is typically no physics functionality in graphics engines like Irrlicht. If you are using graphics and physics engines instead of one like Unity or Unreal Engine then you will run into a problem called “Irrlicht physics”. Recall that Irrlicht is just a graphics engine. It renders object on the screen and that is all. In order for an object to be able to have physics properties you would need to integrate physics and graphics engines.

Collision theory

What is computer physics?

Computer physics is the art of simulating a world inside a computer. The world doesn’t have to be real or resemble anything like our own planet. In a simulation, you can “invent” anti-gravity and see what happens when everything repulses all other objects. There are also some technical limitations when determining what kind of simulation you want to simulate. If you want to simulate how galaxies interact with each other, there is no point in simulating every star and planet in every galaxy. And, simulating every atom in every star and planet is certainly not feasible. A simulation is in most cases a simplification of a real world problem.

Sphere vs AABB collision detection test

As the sphere is being the simplest primitive there is, the test for Sphere and AABB intersection is easy. This solution works also for Sphere Cube intersection tests.

Bullet Physics: How to change body mass

We’ve run into a problem with updates of a mass of the body in our game Burnt Islands. We had some flying robots on the platforms of their factory. These robots were static objects in the beginning with no mass (mass = 0).