apply impulse to btSoftBody

Post Reply
Dena
Posts: 4
Joined: Thu Nov 20, 2008 5:17 pm

apply impulse to btSoftBody

Post by Dena »

how can I apply an impulse or a force to a softbody?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: apply impulse to btSoftBody

Post by Erwin Coumans »

You can use btSoftBody::addForce(const btVector3& force,int node), with node being the vertex where the force is applied to.

For a central force, applied to all vertices, you can use btSoftBody::addForce(const btVector3& force);

Hope this helps,
Erwin
Zenja
Posts: 14
Joined: Fri Jul 10, 2009 4:48 am

Re: apply impulse to btSoftBody

Post by Zenja »

I made the classic blunder of trying to figure out why none of my forces acted on a falling object (I'm trying to get a helicopter to hover). Imagine my embarassment when I figured out that a force of (0,0,10) will do little to an object of mass 7,500km :) Newton must be rolling in his grave after I forgot to factor in the mass of the object.

2 hours was a valuable learning experience (trying to figure why bullet wasn't moving the object). :idea:
Post Reply