enter image description here

I'm trying to to create a compound shape pretty much in the same way I did in my C++ code.

  1. Create three shapes (two btCylinderShape, and one btConeShape)
  2. Create a compund shape using the tree individual shapes (btCompoundShape)
  3. Create a rigid body btRigidBody using the compound shape passing a transformation matrix with some translation

How can it be done in blender?

AFAIK, the option in Properties view panel>Physics tab>CollisionBounds disclosure triangle>Compound has to be enabled for the three bodies, and one of them needs to be the parent, while the other two are its children.

enter image description here

This works pretty well, but I need to add some offset to the parent too, as the picture shows, how can it be done?

Using a fourth empty body as a parent would introduce an additional shape, that would mess the hole thing.

enter image description here

Is there a way to add an additional transformation to the physics shape attached to a mesh?

I'm currently using Blender v2.67b for Mac

  • $\begingroup$ Would it work for your situation if you just merged the three objects into a single mesh object? $\endgroup$ – Gwen Jun 20 '13 at 21:15
  • $\begingroup$ @Gwenn The body has a concave shape, and a hull makes the simulation somewhat unstable when it collides with other bodies. $\endgroup$ – rraallvv Jun 20 '13 at 21:20
  • $\begingroup$ I'm not saying a convex hull, is it okay if your three objects are actually made into one object, with the exact same exterior vertices as before? $\endgroup$ – Gwen Jun 20 '13 at 21:24
  • $\begingroup$ @Gwenn Yes it would't be a problem, but what collision bound would I choose for the mesh? $\endgroup$ – rraallvv Jun 20 '13 at 21:27
  • $\begingroup$ What about the game engine? How would you go about doing compounding? I tried a few test and they seem to jitter and spasm a bit on the surface of an object when they're rotated. EDIT: Nevermind, the problem seems to be related to collision on other side(The floor or something) not having a collision bound. It behaves normally now. $\endgroup$ – user1183 Aug 27 '13 at 13:36

Instead of directly messing with the Physics parameters, this situation is way easier to handle with ordinary mesh tools.

You can merge your three objects by using the Boolean modifier. First, select only one of your objects, then go to the Properties>Modifiers menu and select the Boolean modifier. In the modifier options, for 'Operation' select 'Union' and for 'Object', select one of your other objects. If you then hit 'Apply', your first object will now have the overall shape of those two objects merged.

If you have three objects, you'll need to do this twice (because the Boolean modifier only operates on two at a time).

Also note that the modifier will leave the original copies of the objects in addition to the new, merged version, so at the end, make sure to delete the original objects.

Then, in the Physics panel, select 'Mesh' as your collision bounds.

enter image description here

  • $\begingroup$ I managed to do the boolean operation, but for some reason the physic bound behaves like a mesh generated with the object without the boolean modifiers $\endgroup$ – rraallvv Jun 20 '13 at 21:58
  • 2
    $\begingroup$ @rraallvv Make sure to press 'Apply' in the modifier options. $\endgroup$ – Gwen Jun 20 '13 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.