How to stop this hinge constraint behaviour?

  • What are you attempting to achieve? I have a truckbed thats raises up and down using a single hinge at the end.
  • What is the issue? The entire truckbed is massless, and when a player steps on it, it goes crazy and sends the truck flying.
  • What solutions have you tried so far? I tried increasing servomaxtorque, increasing/lowering restitution, adding a spring to the other end of the truckbed, to no result.

Sorry for horrible quality! Here are the properties of the hinge.
image

ServoMaxTorque needs to be a huge number, 2000 is very small.

Don’t attach Massless Parts to others with Mass. Constraints work best if both the Parts they are attached to have the same Density.

Also experiment with the AngularResponsiveness. It controls how quickly the Hinge is trying to match it’s CurrentAngle to it’s TargetAngle.

Make sure your bed Parts aren’t contacting the frame Parts. You can check off a great tool in the Studio settings Physics tab called “Show Constact Points” which puts red spheres where Parts are touching. It’s awesome for troubleshooting Constraints based systems. I leave it on all the time.

I put servomaxtorque to an absurdly high number and bumped up angularresponsiveness to the max, and although it did help to the point that the truck wasn’t being flung into the ground, but it still can be easily pushed by the player. I’m suspecting it is because it’s set to being massless, so is it possible to lock in the hinge so that it can’t be budged by anything?

The truckbed is not supposed to collide with any of the truck’s wheels or the body parts, it has a special collision group.

image

But don’t make them Massless. The Parts have to have some weight to be able to keep from being flung.
Try making the frame, hinged parts, and bed Density 1.
I’ve also had good luck using Motors for hinges like this. You can set the DesiredAngle and Motor Speed for solid hinges. Again, I don’t recommend Massless main Parts for vehicles with moving parts with Motors either.

I feared making the truckbed have mass would make the hinge unable to lift it, but I’m guessing since it’s settings have been bumped up it now handles it like its nothing? That about fixed the issue.

Try putting a large, dense part at the front end of the bed to see what happens.

Also, not to be a pain, but seems like my suggestion about bumping the ServoMaxTorque and AngularResponsiveness and then increasing the Density was the Solution?

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.