Altering linear velocity of a rigidbody sphere

SuperFreq
Posts: 2
Joined: Tue Apr 29, 2008 10:12 pm

Altering linear velocity of a rigidbody sphere

Post by SuperFreq »

I am trying to alter the linear velocity of a particle system to follow a path (essentially wind) while inside of a mesh. My problem is that when I change the linear velocity of the particle (currently a dynamic rigidbody sphere) it tends to want to push through the collidable mesh that contains it (currently the mesh is a static mesh collision).

I am changing the path of each particle based off of a vector field that will influence each particle in a different manner so I still want to have control over its path when it is not colliding with things and when the field is not active. I am guessing that my problem lies with the fact that I am overriding the velocity that Bullet is setting to keep the particle inside the mesh and essentially telling the particle to keep going through the mesh.

I have tried setting a callback on a collision between particle and mesh and then ignoring vector field path data for the next few cycles, but that doesn't seem to keep them from passing through. It might be too late at that point.

Any ideas on how I can deal with this in a more effective manner? or perhaps a different approach?
Oogst
Posts: 25
Joined: Thu Apr 10, 2008 11:19 am
Location: Utrecht, Netherlands

Re: Altering linear velocity of a rigidbody sphere

Post by Oogst »

Instead of directly changing the lineair velocity, you could also try applying a force. That is more "physics-like" and might work better.