Hi all,
I’m trying to implement hydraulics and hydraulic stabilizers / outriggers in Unity using the physics engine. This would be like the feet that come down on a mobile crane to keep it from tipping over. The way this works in real life is the outrigger feet go down, make contact with the ground and by exerting force on the ground there’s a responsive force (Newton’s 3rd Law) that lifts the chassis up… I’ve been messing around with this for a few days now… first tried just having a piston press against the ground, but apparently no responsive force is modeled into the engine. So, I tried adding a scripted responsive upward force applied to the horizontal portion of the stabilizer which kicked in when a collision between the outrigger pad and the ground (or a ground pad) occurred. This sort-of works, but getting the chassis back down and modelling when the pads should come up is now a concern. Plus, the code is getting a little convoluted because then there has to be a downward force applied when the stabilizer is raised, to take the upward pressure off the chassis. Is there’s a more elegant solution that I’m overlooking? I’ve dug around on the forums and Answers, but there doesn’t seem to be anything fitting this situation.
The other part of this would be implementing the actual crane portion. I have part of that working except when the crane is elevated, or extended, the center of mass changes and thus the force required to manipulate the crane changes. I’ve looked at the various construction posts, but I didn’t see anyone who’s actually tried to model hydraulics. Any ideas on this as well?
In the included picture, pretty much all of the primitives are rigidbodies. The cyilinder (chassis), stabilizer pad and the plate on the ground have box colliders. The horizontal is fixed-jointed to the chassis (eventually this would slide into the chassis), the vertical is connected to the horizontal by a configurable joint which only allows movement on the Y axis.


