This wiki has been moved to https://github.com/SuperTux/wiki into the mediawiki branch.

Collision test app

From SuperTux
Revision as of 00:38, 5 April 2005 by Sik0fewl (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

You can download the example application here:

http://www.stud.uni-karlsruhe.de/~uxsm/code/collplayground.tar.gz

For compilation you need to have SDL and SDL_gfx installed.

It demonstrates point-rectangle-, rectangle-rectangle-, point-polygon-, and rectangle-polygon-sweep-tests. You can set start and end-points with the left and right mouse button. With q you can change the shape we collide with from polygon to rectangle. With p you switch to point-tests, with r to rectangle tests. The startpoint is marked green, the endpoint blue and an eventual collision point white.