animated objects and attached joints/physics

pyalot
Posts: 5
Joined: Wed Sep 02, 2009 9:12 am

animated objects and attached joints/physics

Post by pyalot »

Can I animate an object (setting its position/rotation every frame) which is itself not simulated/infuenced by the simulation, but attach simulated physical objects to it with a joint?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: animated objects and attached joints/physics

Post by Erwin Coumans »

Yes, you can use a kinematic object for that:

Code: Select all

body->setCollisionFlags( body->getCollisionFlags() | btCollisionObject::CF_KINEMATIC_OBJECT);
body->setActivationState(DISABLE_DEACTIVATION);
Hope this helps,
Erwin