4
$\begingroup$

I am experimenting with rigid body physics using the game engine for a project.

This is the setup:

  • I have 2 long rectangular prisms with hole.
  • The 2 prisms are connected with a cylinder (acting as a dowel).
  • I locked translation and rotation for one of the prism and everything else is free to move and/or rotate.

And here's the problem:

The dowel and the free prism are going through the locked prism. Can someone please tell me what am I doing wrong? Thanks.

Here is the blend file: https://www.dropbox.com/s/o2y0pxk7ijk12bc/untitled.blend

$\endgroup$
8
  • $\begingroup$ @CoDEmanX Thank you. I should have done that in the very beginning :) $\endgroup$
    – Icarus
    Commented Feb 7, 2014 at 17:39
  • $\begingroup$ I think its something about the Collision bounds, the rectangular prisms are actually convex, which is not suitable to be set as Box. $\endgroup$ Commented Feb 7, 2014 at 17:42
  • $\begingroup$ @LeonCheung That didn't work. I changed the prisms to convex hull and experimented with the margins but neither solved the issue. The dowel and prism still go through the other prism. $\endgroup$
    – Icarus
    Commented Feb 7, 2014 at 17:56
  • $\begingroup$ @LeonCheung There isn't a concave setting. All I have is capsule, box, sphere, cylinder, cone, convex hull and triangular mesh. $\endgroup$
    – Icarus
    Commented Feb 7, 2014 at 18:05
  • $\begingroup$ Sorry for typo, I mean they are CONCAVE. :P You may consider using the compound in Collision setting. Or try Triangle Mesh. And be sure to apply their scale. $\endgroup$ Commented Feb 7, 2014 at 18:11

1 Answer 1

8
$\begingroup$

There are several problems in this file:

  1. Objects scale hasn't been applied;
  2. Setting Triangle Mesh here is required, since the prisms have holes, which means they are concave objects, so other collision types don't work well with them;
  3. Bound margin should be tweaked carefully, as well. Considering the distance between the surface, try smaller value;
  4. The two prisms stay too close to each other, which will cause "intersection" if bound margin is non-zero.

    Demo file_v3. Just FYI.


Added a demo video for better understanding.

$\endgroup$
3
  • $\begingroup$ That was magic. So the above 4 points you pointed out were the only problems? Or was there other issues? $\endgroup$
    – Icarus
    Commented Feb 7, 2014 at 18:53
  • $\begingroup$ Basically true. However, as you see in the demo file, I locked some rotation and translation axis for a better result. That's the other nice thing to do in your case, but that's not the key here. $\endgroup$ Commented Feb 8, 2014 at 0:05
  • 1
    $\begingroup$ Ridgid Body simulation has a lot of issues with concave shapes. Sergey Reich works on a special "concave" type, but no schedule unfortunately. $\endgroup$
    – CodeManX
    Commented Feb 8, 2014 at 0:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .