Willem Games

Test: Collision detection

Loading ...

How to:

W,S,A,D or arrow-keys for moving around
space to toggle play/pause
's' to switch Shape
'r' to reset Simulation

'c' to switch consistency
'b' to switch bounce
'g' to switch gravity

Clicking will log in console if you clicked on something, or multipe things.

About:

To test collision there are 2 groups:
- primary group of Actor(s), a moving type with a shape, controllable.
- secondary group of Solids, a static/wall/never moves type with a shape.
Shapes can be points, circles, lines, rectangles, ...(triangles and others optional).
The simulation has options like gravity, fricion/consistency, borderBouncing and shape shifting.

Todo:

  1. Primary goal: Actor should detect collision with Solids; (multiple types of actors and solids)
  2. As an extention goal: Actors should also detect collision with other Actors;
  3. As an extention goal: Solids should also detect collision with other Solids;