1
$\begingroup$

I am currently using blender version 2.92.2, and I am making a simple rube Goldberg physics simulation, however, for some of my objects I will need to use rigid bodies that have mesh collision instead of convex hull. My problem is that whenever I do this, it doesn't behave like it should at all. Some things just started bouncing uncontrollably while others just shook violently. I turned the solver iterations and substeps per frame over 1000 and I felt like that just made it worse. All my other objects that have convex hull collision behave normally, it's only when I switch it to mesh collision that it starts acting weird.

Here is an example I have, where I want this hammer to swing around the pivot point, and come swinging down. However, it doesn't do that.
Here is a picture on frame 1: enter image description here

And here is a picture on frame 100: enter image description here

Instead of swinging down like I want it to, it starts bouncing around the center pivot point incredibly fast that it starts rising instead of dropping.

Here are the rigid body settings for my hammer object:

enter image description here

I will give the link to my file below to anyone who wants it. Any help is appreciated.

$\endgroup$

1 Answer 1

1
$\begingroup$

I think that you're compounding workaround with workaround here. You're trying to do stuff with collision when rigid body constraints would work better. If that's the origin of your hammer, you're placing it at the center of rotation, rather than the center of mass, probably to get behavior you want, yet placing the origin here is creating other problems.

The important, non-obvious things for rigid body physics are:

  1. All mass lies at the origin of the object. No mass lies anywhere else. If you place your origin someplace other than the intuitive center of mass of the object, expect unintuitive results.

  2. Apply scale on all rigid body objects.

  3. Simpler collision models are more accurate collision models. (Which it sounds like you've already learned.)

Now, you want to hit something with the hammer. Do you want to hit something with the handle? If you don't, don't try to make this a rigid body; don't try to use collision to control the rotation of the hammer; use rigid body constraints to control the action of a hammer-only rigid body instead (a rigid body with an appropriately placed origin.) Note that the hammer head itself is convex and convex-hull collision would work fine for it. (But for your needs, I'd expect that cube collision would work just as well.)

So try this:

  1. Apply scale on all objects.
  2. Separate the hammer head to a different object. Give it convex hull collision. Set origin to center of geometry.
  3. Remove rigid body physics on the handle, and parent the handle to the hammer head instead.
  4. At the center of the axis, create an empty, give it a rigid body constraint physics, joining the axis (object 1) to the hammer head (object 2.) Make the constraint "hinge" type and rotate it such that its Z axis points in the same direction as the axis. Don't parent it to anything.

I think you'll find that does what you want.

$\endgroup$

You must log in to answer this question.

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