I need to check if my hinge joint motor reached one if it’s limits and which.
I tried to use HingeJoint.angle and HingeJoint.limits.max/min for this. But my joint angle is not 0 at the beginning of the simulation and is not between the limits (altough the limits work!).
Just want to add something that seems to roughly work as well. You can just check against object rotation. Say if you have limits 0 and 30, then your hinge joint reached peak when your rotation (tried it for 2D, so was Z axis in my case) is < -30. This assumes your object starts with 0 rotation in given axis. If this is not true, then just subtract the range of your limits from your initial rotation.
Again example, if your object Z rotation is say 20, with hinge joint limits 0 and 30, then you reached peak for -10 and so on.