This project is read-only.


The collision sandbox is showcasing the collision system of the starLiGHT.Engine. There are different test which you can select with the plus (+) and minus (-) keys.

The following tests are available:
  • ConvexHull
Shows collision of two polygons. You are able to translate one of the polygons using the WASD keys. The first step is to check for collision pairs in the BroadPhase. This is done using the AxisAlignedRectangleBruteForce algorithm. This is very fast with a small number of objects in the scene. The second step is the NarrowPhase which is using the SeparatingAxisTheorem (SAT) to do a detailed check of collision. During this check the penetration depth and the minimum translation distance is calculated. With this information you are able to solve the collision. In this test you are not able to move the movable polygon into the static polygon.
  • IsometricTiles
In this test you are able to steer a knight in a isometric world around a house. The knight is not able to run into the house. The depth is faked by switching the sorting depth to simulate real depth and get correct overlapping. You can turn the knight by pressing the left and right cursor keys and move him forward by pressing the up key.

G key -> Toggle the isometric grid
D key -> Toggle the debug draw
  • RotatingTextures
Shows two textures. One is rotating the other one is convex. PerPixel collision detecting is used in the narrow phase and the AxisAlignedRectangleBruteForce algorithm is used as broad phase.

If a collision is recognized the objects are colored red and when no collision occurs they are green.

The debug display shows axis aligned bounding rectangles and bounding circles. You can turn off the debug draw by pressing the D key.
  • ScrollingCave
Shows a common gaming scenario. An ufo is flying through a cave. You are able to steer the ufo with the WASD-Keys. If a collision is detected the ufo is tinted red. In this demo we are using AxisAlignedRectangleBruteForce as broad phase and PerPixel as narrow phase.

Last edited Jan 7, 2011 at 11:53 AM by Glatzemann, version 2


No comments yet.