5
$\begingroup$

I am trying to model a series of meshes that are connected by hinge points. The idea is that, with some sort of sideways force applied to the first mesh in the chain, the other meshes in the chain will move around and swing on their hinges. Kind of like a toy wooden snake:

enter image description here

The closest I have gotten so far is by placing cubes underneath the location of each hinge point, setting them as 'Passive', and then using them as the hinge for the meshes on each side of the hinge. However this limits the movement of all of the middle meshes a lot (because they are locked by a hinge on each side) and only the first and last meshes move how I want.

Basically I need a method so that the hinge joints can swing about while also causing their own rotations. Does anyone have any advice?

$\endgroup$
8
$\begingroup$

I have failed to give the rigid body enough accuracy for this kind of shape :

enter image description here

So the idea was to use an intermediate simple object : a cube.

enter image description here

The chain is composed with constraints and parenting.

  • The parenting :

Each element of the chain is parented to a cube and each empty is parented to the previous (to the right) cube.

enter image description here

  • Constraints :

Each empty is a hinge constraint connecting the previous and next cube. Don't forget to orientate each empty with the Z along the rotation axis.

enter image description here

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks for the great demo. I hadn't thought of using an intermediary like that. I realised after posting that what I wanted was slightly different (all the rotations are done on one axis) but this method still works well just the same. $\endgroup$ – toysnake Aug 23 '16 at 14:50
  • $\begingroup$ Is there any way to do this within the Game Engine? Exactly the same physics/hinges/etc, but so that it moves in response to something that the user controls? $\endgroup$ – toysnake Aug 25 '16 at 13:06
  • $\begingroup$ @toysnake, unfortunately I know nothing about BGE. You should ask another question... $\endgroup$ – lemon Aug 25 '16 at 13:14

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.