RigidBody and ConfigurableJoint setup question

Hey folks.

I’m trying to simulate the following moving box with a sort of simple extendable 2 part rope.

  • A kinematic rigid body box
  • moved with MovePosition() inside FixedUpdate()
  • Connected to a rigidBody cylinder
  • using a ConfigurableJoint which allows free (or limited) balljoint behaviour. Angles only
  • Connected to a rigidBody cylinder
  • using a ConfigurableJoint which allows free balljoint behaviour as well as y axis movement which i’m controlling by setting it’s yDrive PostionSpring
    [/list:u:de98320ae2]

Basically the box moves forwards and backwards. The first cylinder pivots nicely as it moves and stops. The second cylinder moves nicely forming a sort of rope, but when I lower the yDrive PositionSpring it starts to lower away from the other cylinder, at some point in this lowered state when the parent box stops and causes motion to ripple down the joints it just all goes wrong and glitchy.

I’m trying to have a go with the variables, i presume it needs some serious damping to stop it exploding, but i can’t seem to make it work.

Anyone know if this is possible, i presume some people have done some procedural rope simulations with many of these sections, as i said it worked until I add YMotion to offset the 2nd cylinder… Perhaps this just isn’t possible?!

HELP! :slight_smile:

Cheers

Jim

I’ve uploaded a 2meg video of the glitching here

I’m not sure what kind of effect you are going for here… are you aiming for a chain of capsules coming down from the box? If so, I don’t really get what the yDrive position spring is for on the second cylinder. I would expect this to let the lower cylinder drop under gravity, although I don’t know why it gets as jittery as it does. Are you looking for some elasticity in the chain, or is there another reason why you are doing this (working around a previous glitch, say)?

I’m trying to go for a movable top (the kinematic box), which is connected with the joints to another body that i’ve not built yet due to having these problems.

The best analogy i guess is simulating the line coming out of like a fishing rod… moving the kinematic object to position it, being able to wind the line out or in to lower or raise the hook. I don’t want to waste cycles modelling a full rope so all i really want is a tight swinging “rope” that is always at its tightest. Moving like a ball joint at the top, but being able to be lowered and raised on command.

I’m using the 1st customisable joint to get the ball joint at the top, the 2nd customisable joint has the ydrive and ylimit to allow it to be lowered and raised… I’m keeping the ball joint behaviour as well and i think its these two ball joints interacting at the ylimit thats causing the problem.

I did try originally just using a single customisable joint but what i noticed was the balljoint was moved down with the ylimit so rather than rotating about the top as if attached to the tight rope it dangles vertically down and THEN rotates at that point.

Tbh I’m so stuck on it i’ve moved on for a bit, but it’d be nice to simulate it… I guess i could just use links to make a proper rope… it just comes back to how to get the extendability in there to let it grow and shrink down thats the problem… I seem to only be able to use a customisable joint to achieve this.

Thanks for your help!