Moving a group of rigid bodies at once?

Neirdan
Posts: 13
Joined: Thu Jun 13, 2013 8:07 pm

Moving a group of rigid bodies at once?

Post by Neirdan »

Hi there, first post, new to bullet and physics engine in general.

I am using Irrlicht and I have generated a group of mesh (cubes) that are children of an empty node, so their position is relative to their parent.
I do create rigid bodies with absolute positions.
Before implementing bulletphysics, I used to move the parent node so it would automatically move the children, but after integrating bullet physics, I changed my way of thinking: I must move the rigidbodies and update the mesh position and rotation, not the other way around.

Is there a way to set the position of a rigid body relatively to a parent node that will use absolute position for collision detection and not relative position?
Which demo should I check?

Thanks in advance.

Edit: I was advised to use btCompoundShape
STTrife
Posts: 109
Joined: Tue May 01, 2012 10:42 am

Re: Moving a group of rigid bodies at once?

Post by STTrife »

If you use btCompoundShape, it will be simulated as one single rigid body. If that is what you need then that would be the best solution.