Quickb2 softbody rotation

Is there a way to get the rotation of the soft body, or of one triangle in it instead?
I've tried a lot of things, and none really worked :\
I even tried getting the avg angular velocity and adding it in a variable and getting that, but it was somehow incorrect or something.

So, if you know of an easier way, please tell me 😀

Thanks,
Tamper
Soft bodies cannot have a definite position or rotation, because these aren't well-defined. The best option is to look through the soft body's children, find the first qb2Body, and use this body's rotation. For position, use the centerOfMass of the soft body.

I might add a convenience function for getting the rotation this way now that I think about it.
I tried using getAllRigids()[0].rotation, but it always returns 0.
Is that what you meant? Or am I doing it the wrong way?

EDIT:
Works now!
I'm using getObjectAt(0).rotation, and it works 100% 🙂

Thanks a lot! 😀

Tamper
hmm, yea i'm probably going to get rid of the getAllRigids function...it was a bad idea, and I'm not even sure if it's implemented...thanks for reminding me about it.

Original thread: https://box2d.org/forum/viewtopic.php?t=6783