ball and pivot example

I’m trying to figure out how to get this simple(???) “mechanism” to work in the game engine. (b 2.61)

I’m messing with the pivot constraint and the rigid body joint, but I’m not sure how they’re supposed to work.

When the ball falls on one of the green “wings”, the green assembly should rotate around the red “axle”

Thx for any tips / info

Mike

(blend file attached b 2.61

Attachments

gearGame1.blend (402 KB)


Instructions:

  1. Set the pivot to “rigid body” and set it’s collision bounds to “triangle mesh”
  2. select the bar, delete the constraint from it. It is not necessary as it is the part that is “fixed”
  3. select the pivot again, and set it’s constraint to “Hinge” with the pivot rotation being rotated 90 degrees on the Z axis.

If you want the modified blend, just drop me a PM

Hi @sdfgeoffdfgeoff,
http://statusicons.cgcookie.netdna-cdn.com//user-offline.png
Thanks !

Your hinge constraint works better than the 6-dof I found here:

http://wiki.blender.org/uploads/1/14/BGE-Physics-RigidBodyJoints.blend

from
http://wiki.blender.org/index.php/Doc:2.6/Manual/Constraints/Relationship/Rigid_Body_Joint

The 6-dof works, but the pivoting “green part” was oscillating randomly after the ball hit it, for some reason, while the hinge constraint seems to be quite stable.

Hmm… the “instablity” of the 6-dof seems to have been when I had the constraint on the (red) “rod”, with the “greenWheel” as the target.

When I moved the constraint to the green wheel and left the target blank, the constraint worked as I expected. (contrary to the note on the wiki which states “This constraint uses one target, and is not functional (red state) when it has none

Mike