How to add angular velocity to a soft body

iwg_eric
Posts: 8
Joined: Sat Apr 30, 2011 2:28 pm

How to add angular velocity to a soft body

Post by iwg_eric »

I've recently converted my rigid body to a soft body. With my rigid body, I would use body->setAngularVelocity(btVector3 angularVelocity); to add spin to the rigid body. Is there a similar method to add spin to a soft body?
User avatar
dphil
Posts: 237
Joined: Tue Jun 29, 2010 10:27 pm

Re: How to add angular velocity to a soft body

Post by dphil »

Not that I'm aware of. Implementing certain rigid body features like that is much more complicated for soft bodies, which essentially have separate transforms/velocities for ever node, and a dynamic centre (of mass). Offhand I'm not sure how you'd go about mimicking that functionality for a soft body.
User avatar
majestik666
Posts: 66
Joined: Tue Mar 02, 2010 6:13 am

Re: How to add angular velocity to a soft body

Post by majestik666 »

there's no such thing for soft bodies...
in our implementation you can apply velocities by calculating
the proper velocity for each node in the soft body.
it's not a one line thing but still pretty easy/fast to implement

Francois
iwg_eric
Posts: 8
Joined: Sat Apr 30, 2011 2:28 pm

Re: How to add angular velocity to a soft body

Post by iwg_eric »

Thanks for the feedback. It seems to be working by crossing the angular velocity I want to add by each nodes relative position and adding the result to each node.
XMight
Posts: 32
Joined: Tue Feb 22, 2011 1:00 pm

Re: How to add angular velocity to a soft body

Post by XMight »

Hi,
I obtained torque on a soft body by applying an clusterVAImpulse for every cluster of the soft body :)