Back to Content

The Physics Engine in CopperCube

CopperCube includes a physics engine for moving objects and colliding stuff automatically. This section gives a small overview on how it works.

The built-in Collision and Response System

By default, CopperCube has enabled a simple and very fast collision and response system. It works on all targets with very high performance, even on slower targets like Flash, Android and WebGL.

With it, characters can move through the 3D world, move up stairs, and collide with walls. You only need to add a Collide when moved behavior to the object, and everything then works automatically.
However, this system also has shortcomings:
If you want more advanced features for the physics in your app, you can use a 'real' physics engine in CopperCube as well:

The built-in Physics Engine

Alternatively, CopperCube also has a built-in 'real' physics engine: Objects will collide with each other, influence each other and similar, just like in the real world.
To make this work, you need to enable the physics engine in the publishing settings dialog. This only is supported for some publishing targets, such as Windows .exe and Mac OS X .apps.
Use the Collide when moved behavior for characters moving through the world as before, and add the Object moved by physics engine behavior to objects which should be moved in the 3D world, like boxes and barrels, for example.

The system works nicely, but there are still a few limitations: