[fluxus] advice about hijacking collision data

Alex x37v.alex at gmail.com
Sun Jan 29 16:02:17 PST 2006


Hi, so I like the idea of being able to detect collisions very easily,
but I want to make a system where my objects don't have to obey other
physics rules.  I don't want to have to have all of my objects obey
the laws of gravity.  I'd basically like to decide on a per object
basis what the object does if it collides... each object might have a
different reaction to a collision, some may be to bounce off, some may
fuse with other objects, change color, etc.

Can someone suggest a way i could do this?
>From my early tests it seems that if I move objects myself (they are
active cubes), with a gravity vector of (0 0 0), that (has-collided
myob) is never true even if i can see that objects have collided.
If I make a gravity vector of (0 -1 0) but make my objects passive I
don't get any collision results either (again I am moving an object
myself).

If this were an OO design I might like to be able to subclass a basic
object type that would react to gravity and collisions.  In the
subclass I could make my own collision method which may or may not
call the superclass method.  Also, the draw method of the superclass
would translate the object based on its velocity and gravity, and I
could decide if I want to call that method or not in a subclass draw
method.

Suggestions?
Thanks,
Alex



More information about the Fluxus mailing list