[Fluxus] Detecting collisions without bumping stuff

Kassen signal.automatique at gmail.com
Wed Dec 12 01:00:58 PST 2012


On 11 December 2012 21:14, David Griffiths <dave at pawfal.org> wrote:
>
> bb/bb-intersect? might be sufficient depending on the shape of your
> objects...

I tend to even use (vdist ) on the two location vectors, then compare
that to the radius of such objects that I store. If vdist is smaller
than RadiusA + RadiusB we are colliding, for bouncing against "walls"
it is even more simple. Cheap, cheerful and covers a lot of cases in
practice.

Also nice for this kind of thing; with the raycasting line-intersect
thing for moving objects against static ones we can predict when it
will hit in the future, given the speed and direction. With
time-stamped OSC messages that means latency-compensation for your
sound. Worked for the "pong" game I did and was a nice case of "game
designers cheat worse than game players". :-)

Cheers,
Kas.



More information about the Fluxus mailing list