Download

Physics Assets and C++

I have a skeletal mesh component that I have been recording the bone rotations of so that I can replay the poses of the animations by giving the bone rotations to the poseable mesh component.

I want to do the same recording process while the skeleton is in ragdoll mode, so I created a physics asset from it but I can’t seem to get at any of the physics assets’ information, such as bone rotation. If I try and access the skeletal mesh component (now with physics enabled and in ragdoll form) information it just returns me the values from the ‘invisible’ skeletal mesh component that has been hidden and replaced by the physics asset, I assume.

Can anyone give me an idea of how to get the bone rotations from a physics asset?

Thanks

Does anyone know a way of getting data from a ‘ragdolled’ skeletal mesh?

I am also looking for this.
I noticed that when you export the physics asset (say just to your Desktop) and then open it with Notepad or some text editor, then you will see it all as C++ Code. Every constraint, every swing angle …everything. There must be a way to read/write the physics asset at runtime. Unlucky, I have no visual studio on my laptop right now.

I just checked out the exported Physics Asset file and it seems somewhat useful, but I’m worried that the information in it is only a store of the initial state and I doubting whether or not it’s updated at runtime with new values. Hope someone may have a breakthrough, report back if you have any luck!

yes, if it is just initial, then I will try to figure out where it goes and grab that for input. Hopefully it does not get buried too deep into PhysX itself.
It is also good to see, that when changing the PhAT constraints, then no re-compiling is needed. That’s a good sign when thinking about changing PhAT constraints at runtime.

In the end, PhAT constraints seem like normal contraints, and normal contraints can be changed at runtime. In fact, I am thinking of building my character using normal contraints and primitives. I built a ragdoll using cubes and normal contraints once in the example content - physics and it worked well.
Would be nice though if it was possible to use Skeletal Meshes + PhAT for better workflow and change PhAT constraints.

Hmmm, well you seem to know more about PhAT than me, I’ve only dabbled. If you wouldn’t mind, please let me know if you notice anything that might allow me to get the joint rotations at runtime. Thanks a lot!

look here

I got a nice reply! It is possible, just not in blueprint yet, but only in C++.
Can you let me know if you make progress? I have still to install VS2013 and can not try myself.