I'm using ArticulationBodies and one of the properties that I'd like to store is of type "ArticulationReducedSpace" (jointVelocity and jointPosition). If saved at the moment, only the degrees of freedom are saved:
Code: Select all
{"dofCount": 1}
You can replicate this by adding a ArticulationBody to a Cube and add another cube as a child and setting the child ArticulationBody to anything but "FixedJoint". Then, check auto-save for the ArticulationBody and save jointVelocity and jointPosition properties. In the json, you'll only see the dofCount as mentioned above.
I worked around this by adding a ES3UserType_ArticulationBody and also a ES3Type_ArticulationReducedSpace. So now I can do this:
Code: Select all
writer.WriteProperty("jointPosition", instance.jointPosition, ES3Type_ArticulationReducedSpace.Instance);
writer.WriteProperty("jointVelocity", instance.jointVelocity, ES3Type_ArticulationReducedSpace.Instance);
So my feature request would be to provide the implementation from your side. I added my naive implementation to the post in hoping you'll improve on that with best practices.

Thanks for the great asset.. I've been through all the serialization/deserialization myself and it worked, but your code is saving so much time and hassle for me! I'm really happy!