Repositioning (articulated) rigid body.

Apat
Posts: 7
Joined: Mon Oct 04, 2010 5:54 pm

Repositioning (articulated) rigid body.

Post by Apat »

Whats the "best" approach if I want to reposition an object that consists of many rigid bodies with constraints? Like a ragdoll or an articulated vehicle.

I guess I have to reposition/transform all rigid bodys making up the object.
Apat
Posts: 7
Joined: Mon Oct 04, 2010 5:54 pm

Re: Repositioning (articulated) rigid body.

Post by Apat »

Forgot to mention, I'm not talking about moving a character from user input, more like reposition objects for example reseting the scene or updating position for an object from an server correction in a client/server enviroment.
Basroil
Posts: 463
Joined: Fri Nov 30, 2012 4:50 am

Re: Repositioning (articulated) rigid body.

Post by Basroil »

I'de suggest looking at the source code, specifically DemoApplication::clientResetScene() in OpenGL folder. That's how the demos reset the scene, so perhaps you'll find what you need inside that.
Apat
Posts: 7
Joined: Mon Oct 04, 2010 5:54 pm

Re: Repositioning (articulated) rigid body.

Post by Apat »

Thanks for answering! Though I've checked the function, its just:

exitPhysics();
initPhysics();

So its not really a repositioning of objects, more like a restart.
Basroil
Posts: 463
Joined: Fri Nov 30, 2012 4:50 am

Re: Repositioning (articulated) rigid body.

Post by Basroil »

Apat wrote:Thanks for answering! Though I've checked the function, its just:

exitPhysics();
initPhysics();

So its not really a repositioning of objects, more like a restart.
Really? Last I remember it had a bit more :wink: http://code.google.com/p/bullet/source/ ... n.cpp#1336
Apat
Posts: 7
Joined: Mon Oct 04, 2010 5:54 pm

Re: Repositioning (articulated) rigid body.

Post by Apat »

Hmm what the frack! I'm not sure what I looked at now :oops:

setCenterOfMassTransform seems like a thing to try out.

Thanks allot!