btCapsuleShape with variable height

vitorlima
Posts: 2
Joined: Mon Dec 17, 2007 9:42 pm

btCapsuleShape with variable height

Post by vitorlima »

I'm writing an application which represents a huge deformable cylinder-like structure with a constant radius that can be bent, I used several capsules joined by the center of their hemispherical caps to represent its collision shape, but I don't know how to create this in such way that it is possible to change the structure's length during the simulation. Can it be done? So far I've tried to use setLocalScaling, but looks like it can't be used to change the shape's dimensions on the fly.
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: btCapsuleShape with variable height

Post by sparkprime »

My experience is very limitted but I believe you can (either in 2.69 or svn) add/remove child objects from the compound object, so you could keep adding / removing capsules to get the length you wanted.