Hello everyone,
In my scene I have an ArticulationBody setup in a hierarchy of three GameObjects, each one part of the ArticulationBody with its own Joint defined as a part of the ArticulationBody.
It looks like this:
- Articulationbody (Root body of the articulation)
- Articulationbody (Joint type: Fixed)
- Articulationbody (Joint type: Spherical)
I am applying different forces to the last Joint (Spherical joint with full freedom and no axis locked) and I would like to know the forces acting under this Spherical Joint.
I understood from the documentation that this is possible thanks to the method ArticulationBody.GetJointExternalForces but I am struggling to get this information.
I have identified the Index of my ArticulationBody through Articulationbody.Index and I think I have to use also:
ArticulationBody.GetDofStartIndices
, but honestly I think I am not understanding correctly the documentation.
When I call:
ArticulationReducedSpace space = myArticulationBody.jointForce;
Debug.Log("Reduced Space 0: " + space[1]);
I can read always Zero for the 3 degrees of freedom of my spherical joint placed on the last element of the hierarchy.
Could someone please give me a bit of clarity on how to achieve this or how to correctly use these methods?
Many thanks and happy coding everyone
Pablo