Why is HingeConstraint so elasticy?

I’m trying to make an animated insect leg (Robotic style) with HingeConstraints - Problem? They’re so freakishly bouncy that I can’t do any accurate movements!

GIF of what it should be doing about 8x-10x faster

GIF of the leg running at the desired speed

The details of my game (Specifically issues that could be causing this)

  • PGS Physics Solver is ON

Things I’ve tried to combat this:

  • BodyForce to make the parts have “zero-gravity”
  • Edit physical properties (Primarily density)
  • Change torque of hinges
7 Likes

Constraints aren’t precise. Use motors instead.

It seems like this boils down to the same issue that was discussed in this thread (i.e. constraints should be able to exert infinite force and torque similarly to motors).

This goes under client bugs btw

1 Like

Constraints should be very precise. Are you using limits on those hinges? Is there any restitution?

3 Likes

Even with a Restitution of 0, hinges do not have the same physical properties that the Motor object does. In this case I would side with using Motors. One thing to note is that if you increase the density of the two objects being hinged you may subside from some of these effects, but in this case the density has already been changed so im all out of ideas.

I’m not sure what you mean by the “same physical properties”. But you are correct in that hinges sometimes don’t play well with high mass discrepancies. When you changed the density, what did you do specifically? Did you try to make it so the parts are closer together in mass?

Please post a model that shows this so we can take a look. Constraints should have no compliance unless the max force or torques are set too low.

Thanks.

Yes, I have limits and restitution is set to 0.

Walker Leg.rbxm (6.0 KB)
You can just run the simulation and it’ll all work.

EDIT: In the GIF I posted I was using MeshParts, now I am using (0.2 x 0.2 x 0.2) blocks with SpecialMesh.

Thanks for the model! We’ll take a look.

Sure thing.

Making the masses (densities) of the upper arms larger and lower arms lighter will fix your problem (try densities like these: 10 -> 5 -> 2 -> 1).

Or you can try making the upper arms larger and lower arms thinner… keep in mind the meshes have no mass. You need to make your mechanism with standard parts first.

Okay, I’ll try that out.

I’m a tad caught up in other stuff right now. I’ll get back to you in a little bit when I can get reliable results.

Okay - I replaced the parts with SpecialMeshes to actual MeshParts (So that the size and mass is more accurate) and did as you said, starting with a large density at the base, continuing to decrease density as I went towards the foot model.

This did seem to fix the issue for the most part aside from a very minor twitch at the end of each movement, which I’m certain can be fixed with more tweaking.

Servos are always going to be wonky. Too many variables that depend on your geometry and what you want to do. For more complex situation like this, you are better off using a “Motor” instead of a “Servo” and write your own controller in Lua + use limits.

1 Like

Okay. Thanks for the info, I’ll get to writing that and hopefully things work as-intended.

1 Like

I know this is old, but god damn this is still an issue and it is problematic.

I’d still like to see this fixed or at least some way to prevent the Servo mode from making the parts bounce / have elastic behavior.

My game is heavily dependant on suspension based vehicles, and having Servo do this behavior which causes steering to be odd is a big turn off. Motor already doesn’t have this issue, so why not apply some way to have it work with Servos as well?

Having to write my own custom Lua implementation so everything works with Motors doesn’t seem necessary or reasonable to me. Servos already exist, they just need to have the elastic behavior fixed.

I’ve ended up having to lower my vehicle’s steermotor Servo AngularSpeed to 1 (which feels incredibly slow and delayed) so that this behavior doesn’t occur.

Please add some way to have this removed or disabled. It’s 2020, and I need this more than ever.

21 Likes

I use a motor to control steering, but I use an AlignOrientation to force the king pin into the correct rotation. This works fine as long as you are using prismatic constraints for the suspension and not doing crazy things like assymetric four bar linkages or live axles or what have you.

2 Likes

I am having a similar issue where I’d like to spin a part faster than 475 Rot Velocity but they just go flying into space whenever I try to. Motors do the same thing, when spinning too fast they tend to go flying. This is a Roblox physics engine issue, and needs to be fixed asap. They are too elasticy. I posted a topic on my issue in more detail here: https://devforum.roblox.com/t/engine-bugs-updated-post-roblox-hinge-constraints-freak-out-at-low-speeds/649921/3 All I got was a staff member telling me I posted wrong. Almost seems like they do not want to visit this issue, and are avoiding it intentionally. Reposted the issue properly and nobody seems to care. It’s been hours and no response. A fix would at least be nice for this issue, but a patch for this glitch is really what’s in need here.
Edit:
Density and physical properties do not affect the issue

4 Likes

Please make Servos more reliable and precise. The unreliability of Servos feel so random and aren’t documented anywhere leading to huge frustration when making a chassis, this shouldn’t be the case. As a developer, this change would greatly enhance my ability to make vehicle chassis’ without going out of my way to make my own version of a servo out of a motor.

4 Likes

Thank god I wasn’t the only person who felt the need to put this thread back in action.

It’s 2021, and every type of constraint in roblox is basically still as pathetic at holding itself together as it was 5+ years ago. Heck, I think they’re not much better than the pre-constraints system of using surface hinges when it comes to sticking together.

Doesn’t matter if they’re hinges, ball sockets, or even springs, the classic “can’t stay put and vibrates constantly” style of constraints we all know and love hate is still at large.

I mean look at this nonsense:
I tried to make a conveyor belt using pretty much every constraint imaginable, from rope to spring with max lengths set (And of course, no restitution.)

…This is what happens when I try to “tighten” it by lowering their lengths…

Oh, great. You can see that I’m tightening the constraints enough to rip them apart, but for some reason, they’re still physically “sagging” or “drooping” as if they’re too loose. Isn’t that something? - the physics system clearly just doesn’t enjoy working with the constraints system.
When viewing the Length of these constraints which should physically be unwilling to go past their Max, you end up seeing them a good .5 or so studs too long. Even when they’re only under their own weight - regardless of the density or size or anything of said part.

Point is, this is and always has been a global constraint issue with roblox for years and years. They were, and remain, inconsistent and impractical. You need to really work around their glaring inconsistencies to try and put together something competent, which is not ideal for you know… a game engine.

4 Likes