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.

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.

Basic primitives

Introduction

When you want to do real time computer physics, like what we see in games, you will have to break the world into understandable items. It’s like Caesar’s divide and conquer tactic. When you are playing in a complex scene, all what really goes on in the physics engine is broken into small, but many pieces. This enables further optimization down the line, which will be covered later, but for now this keeps the collision detection and collision response algorithms easy to understand.

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).

Collision detection in practice

There are a number of methods to choose when programming a collision detection. They vary from simple to complex and from accurate to not at all.