Download

I have some C++ physx code that I would like to transform into an Actor in UE...

I am a beginner in C++ and taught myself to do some Physx code. It was not easy.

Now I have a small bit of code (100% independant from unreal) that build a chain of capsules put in motion by random forces…

What I would like to do now is to make an Actor out of it, that is I would like to be able to create as much of these chains in the editor… If I could change the number of segments of the chain, it would be even better.

Is it possible? Or would it be easier to use the components (UPhysicsConstraintComponent) in unreal? (source How do I create linked rigid bodies? - UE4 AnswerHub)

Why not just use the existing Cable Component, which basically simulates long flexible objects?

Can the cable component be skinned with arbitrary mesh?

Because ultimately, I would like to have each rigid bodies in the chain associated with a bone to deform a mesh. Also configure my joints to avoid unwanted twist, detect self collision. Etc…

And the chain could possibly be branched too…

Suppose I want to make non human playable characters, like a mollusk or a starfish…

The cable component does not seems customizable up to this point. Unless I’ve missed some updates on the cable component.

Meh! You are looking for Phat tool, more commonly known as physics asset. It allows you to add physics bodies to bones of a skinned mesh, its very common tool and you can do everything you said like constrains and even more with that.

Tried the Phat tool. But it creates weirdly sized geoms for physics collision, so on creatures with a large number of segments (and by large I mean 10 to 20 segments) I spend more time rescaling than anything else.

Unless there is a tool that allows you to define the size of said geoms straight in Blender or in the FBX file format…

:slight_smile: I would not ask if I had not tried everything I could (that I know of…)…

umm no you need to use the phat only , you can try setting other values to ignore small bones and things to give you a cleaner collision. Other than that I don’t think there is a way to get physics for skeletal mesh without lot of duct tape style code