Best way to do “one-way” collisions ?

Software: Away3D 4.x

NoseKills, Newbie
Posted: 14 March 2012 01:25 PM   Total Posts: 8

Hi

Seems like a long time ago the filters and masks worked in a way that allowed for one-way collisions, meaning that only one of the bodies reacts to the physical impact.

http://www.bulletphysics.org/mediawiki-1.5.8/index.php?title=Collision_Filtering

What’s the easiest way to do this nowadays? I have a moving rigid body (A) and a bunch of other rigid bodies. They all should collide with each other, but so that body A’s motion isn’t affected by the collisions.

   

Alex Bogartz, Sr. Member
Posted: 14 March 2012 05:29 PM   Total Posts: 216   [ # 1 ]

You set the mass of the one object to zero, then things bounce off it but it will never move from a collision.

   

NoseKills, Newbie
Posted: 14 March 2012 08:25 PM   Total Posts: 8   [ # 2 ]

Thanks for the reply.

Setting mass to 0 = static object, right? Problem is body A would have to move due to gravity & collide with some static bodies as usual, but there’s a certain group of dynamic rigid bodies that should not affect A’s movement upon collision.

I’ll just set the mass of those other rigid bodies close to 0 and see how far i can get with that.

Looking at the Bulletphysics Wiki, it looks like it wouldn’t be trivial even if
i had access to the source and could overwrite the collision callbacks and stuff hmmm All the code samples there deal with determining if a PAIR should collide.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X