rdeioris / glTFRuntime

Unreal Engine Plugin for loading glTF files at runtime
MIT License
337 stars 119 forks source link

No generate collision for Skeletal Mesh? #64

Open Trewell opened 1 year ago

Trewell commented 1 year ago

Hello! Thank you for your hard work.

But I have a problem. When I load an animated GLB skeletal mesh with the plugin, it has no collisions. I use this node to set up the loaded asset, but unlike the static mesh nodes, I don't see any way to control collision generation and I couldn't find this information in the documentation. Per poly collision doesn't seem to affect this. Could you suggest what I am doing wrong? Thank you!

image

rdeioris commented 1 year ago

Hi, you need to fill the PhysicBodies map where the key (the bone name) maps to an array of capsules. Take into account that generally you prefer to assign a single capsulecomponent to the whole skeletalmesh (and rely on physics bodies for ragdolls)

Vigoss2333 commented 7 months ago

Hi Trewell,

I hope you're doing well. I came across a similar issue to what you mentioned in your previous comment about loading animated GLB skeletal mesh with the plugin. I've been trying to set up collision for the loaded asset, but I'm having trouble understanding how to use the PhysicBodies map, especially when dealing with animated meshes.

I noticed your conversation with @rdeioris, and I'm struggling to grasp the solution he provided regarding filling the PhysicBodies map with capsules for each bone. Unfortunately, I couldn't find specific information in the documentation.

Would it be possible for you to provide a more detailed example or guide on how to fill the PhysicBodies map for an animated skeletal mesh? If there are specific steps or code snippets, that would be incredibly helpful.

Thank you for your assistance, and I appreciate your hard work on the plugin!