Collision representations

(Redirected from Tutorial: Physics mini-game)
Jump to: navigation, search


He intermediate.png

The collision representation for a character is generally a lozenge shape
Each asset's Collision Representation defines how it is represented within the physics simulation of an area. It delineates where an object's "edges" are, so that the physics simulation can determine when other objects collide with it. The Representation might be as complex as the exact shape of the object (which can be very CPU-intensive), or as simple as a rectangular box (easier on resources, but perhaps not as satisfying in gameplay). The choice of how detailed a representation to use, is up to your design team.

To view collision representations, open the Physics panel and select the View Physics Data checkbox.


The collision representation for any particular asset instance is drawn from one of the following three sources:

  1. If no other change has been made, it is automatically set to
    • EXACT MESH, if it is a STATIC object (see PhysicsType)
    • CONVEXHULL, if it is a DYNAMIC object
  2. If the collision representation has been modified via the Physics Shape Editor in the Physics Panel, then a Physics INI file is created in the Repository to maintain this new information. This then affects all instances in the world which have been created from that particular asset, if those assets are set to use DEFAULT_SHAPE in their PhysicsShape property
  3. The above two methods can be overridden on a per-instance basis, by directly modifying the PhysicsShape property in the Properties panel from DEFAULT_SHAPE to something else such as:
    • ConvexHull
    • Simple Sphere
    • Simple Box

Note: Even when using some other type of Collision Representation, the original mesh artwork representation is still also in existence, since it is needed for raycasting and Line of Sight checks, which are always done with the original artwork.

Simple Sphere
Convex Hull


As seen by the red mesh here, the collision representation of an object is often the same as its actual polygon mesh

Look at your character, and note that the wireframe representation appears as a lozenge shape (you may need to bring your viewpoint closer to your character to see it). You should also be able to see collision representation gridlines in a portion of the nearby heightmap, and around any nearby objects.

It is important to understand that the physics representation of a character or object, may not be an exact representation of how the object looks, but is instead a simplified version to speed up processing. However, this is customizable, as will be seen in this tutorial, so the detail of the representation can be increased or decreased, as desired for your own game design.

When an asset is animated, its collision representation will be based on its static pose

Animated assets

When an object has an animation, the physics representation will be based on its static pose.

See also

Personal tools