QH… one more idea. “stoppers”. By using stopper blocks (invisible physics-active parented boxes, perhaps)… you can create limits on rotating “arms”. When a hinge/slider/distance joint travels XX distance or angle… these invisible blocks collide, disallowing further motion.
Ammo setMotor works. Ammo setLimit doesn’t. So, possibly, with these invisible stopper-blocks… you could make your own limiters. You could even incorporate them into the game itself… allowing a “show crane stopper-blocks” and perhaps allow them to be drag-adjusted.
joint.getAngle() or .getDistance()… might still be a challenge… if you ever need those.
Anyway, I just wanted to remind you of another limiting method… via “compound” (parented or lockjoint-linked) mesh/impostors. I prefer a “tight” lockJoint (low-flex distance joint) to hook stopper-blocks to other impostors… but that is a bit of a pain. (setting many joint connected pivot points and axes)… and dragging a stopper is WAY more difficult (using joint-attached stopper-blocks).
But… lockJoints… work better than parenting, in my opinion. They have SOME flex… so when your crane arm hits a stopper-block… its an eased-stop. Not much eased, but SOME. The stopper block will move a tiny bit… when crane-arm hits it (it’s invisible, so user doesn’t care). It will probably give you some spingy-ness at stopper-block impact, too… making the crane arm wobble back and forth a bit, after impact. Realistic!
You can still calc a crane arm angle… from the crane arm mesh. But, asking the joint to REPORT it’s current position… might be rough (unless willing to native-dive). Sorry, SO talkie I am.