[fluxus] advice about hijacking collision data

Alex x37v.alex at gmail.com
Wed Feb 1 12:01:14 PST 2006


Thanks for the response.
I am using the cvs and I did just look at that example.. nice.
An id for collisions would be very nice, it would help me selectively
exchange information between objects based on interactions.
Do objects have have stored "center" point or is there any function in
fluxus that will give the center point of a box, sphere, etc?.. I
realize I could calculate this myself but i figure it would be useful
for others as well, I'm basically wanting to calculate rough distances
between objects.

One thing I noticed. Fluxus segfaults on my computer when i try to
kick a passive box, i realize i shouldn't do this but a segfault isn't
so nice :)

Do you think it would be possible to put active objects inside other
objects?  So far it looks like you cannot with fluxus.  Like a sphere
that has another sphere bouncing in it.

Also, I'm don't quite understand the surface-parms (I even read the
ode docs a bit), can I set them to get perfectly elastic collisions?

btw, is there an irc channel that people using fluxus hang out on?

wow, lots of questions here..

thanks a lot,
-Alex

On 1/31/06, dave <dave at pawfal.org> wrote:
> On Sun, 2006-01-29 at 16:02 -0800, Alex wrote:
> > 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.
>
> this is complex stuff, not all is possible with ode, and even less is
> exposed in fluxus. however some things are possible.
>
> > 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.
>
> are you running the cvs version? there is an example script to show you
> how to do this (20-interactive.scm) which creates objects that change
> colour when they collide.
>
> > 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).
>
> only active objects generate collision events - passive objects are just
> bounding volumes in the scene, and aren't processed in the same way.
> also, you can't manually move passive objects (you're just moving the
> render geometry, not the physical bound - I should make this not
> possible really as it's confusing)
>
> we do need more information than (has-collided) currently gives you -
> for instance we could attach objects together with joints when they
> collide if we could get the id of the object the collision has occurred
> with, or even break joints in the same way.
>
> I'd also like to expose some indication of the force of the collision,
> but I'm not sure there is a way to know that...
>
> just looking at the ode docs, I notice that you can disable the force of
> gravity for individual objects, but the value of gravity itself is
> global to the world. a per object on/off this would be useful, I'll add
> it to the todo list
>
> > 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.
>
> there are a lot of restrictions with phsical simulations which mean it
> isn't possible to move an object except through forces (this is sort of
> clear, if you understand that the ode needs to be aware of an object's
> translational and rotational velocities in order to calculate new
> velocities based on collisions)
>
> so when you give an object to ode, you give up all direct control of its
> movement, and can only affect it by modifying it's velocities through
> kick and twist. there are ways of blending motion between the forces and
> animation paths, but this is difficult to set up, and a bit far off atm
> - I'd like to concentrate on more basic things like allowing arbitary
> polygonal collision volumes.
>
> cheers,
>
> dave
>
>



More information about the Fluxus mailing list