I’ve created a function (using a template from someone else) that creates a poseable mesh based on a ragdoll to essentially “replace” the ragdoll after a few seconds.
However, when the poseable mesh is created, it tends to disappear at most camera angles. It’s really odd because it renders from certain angles/distances. I’ve tried increasing the bounds and using different PhAT setups. I’m working on the Feb Game Jam so I’m tearing my hair out trying to figure it out.
I've spent a few hours but to no avail :( Anyone have any suggestions?
Welp, I know this isn’t the best solution but I found a fix. I added a 0.1 relative offset on the Z axis to poseable mesh right after it is created and now it works! The root issue is something else I’m sure, but just in case someone else has this issue, hopefully this helps.
I’m having a similar issue, though the camera angle is never changing. I have a locked ~60 degree “isometric” perspective. The issue seems to be tied to the camera’s location, but it’s seemingly arbitrary.
I suspect that we’re trying to accomplish the same thing - leave behind a poseable mesh copy of the destroyed actor’s ragdolled mesh?
I’m going to try your solution, but I am curious why this happens in the first place.
Well I tried your solution, adding an offset to the poseable mesh component. I also tried adding an offset and so far none of it has worked for me. I think it has something to do with the way the mesh collides with the ground, though I have no solid evidence of that. I’ll try going to the extremes, making sure that the mesh is absolutely not colliding with the floor when it spawns.
In the meantime, though LeoCurtss found a solution, I still consider this an unresolved issue. I would love to get some Unreal staff in here because this seems like a pretty reasonable use case if you want to leave behind ragdoll corpses. Help!
Hey I’m not sure why adding the offset solved the issue for you, but I did some more investigating and I think I found the source of the issue.
On the Poseable Mesh Component on your blueprint, if you look in the rendering section of the details panel, there’s a field called “Bounds scale”…it seems that the reason that the mesh was disappearing and reappearing was because the scene root (which is not visible in game) of whatever you’re using to create the ragdoll mesh was out of the camera’s view. I believe that this is used as an optimization, similar to culling. Increasing the bounds scale will essentially give the scene root more of a “detection” radius if I understand it correctly. I bumped the bounds scale up to 100, which I’m sure was way too high, but the meshes never disappear now. Give it a try and see if it works!
My best guess for WHY the scene root was out of the camera view when you could clearly see the mesh is that, since you’re working with ragdolls, the physics causes the ragdoll to be in one place, while the scene root could be in a completely different place. When this was happening to me, the disappearing wouldn’t happen 100% of the time, and when it did happen, it seemed that it occurred at somewhat arbitrary camera locations.
One thing to note is, I couldn’t access the bounds scale variable through blueprint nodes, it must not be exposed to a node for some reason. So in my use case, I created a BP_Corpse that has an empty Poseable Mesh Component with the default Bounds Scale set to 100. Then in a custom event I set the Skeletal Mesh and pose to be that of the ragdoll that I want to capture.
Hope this helps! I’m certainly relieved to have found a solution for myself.
well, meet the same issue and I think i know what is the question. Let’s look at the AddPoseableMeshComponenet Node:
Note the second parameter ‘Manual Attachment’, if you set it your poseableMesh must attached by yourself. But if you set it and dont attach the mesh to anything it seems like still attached to something like a root. where is the root? i dont know but i think it’s in the scene somewhere. the Mesh you created is cull off with root. Then your camera face to the root you can see the poseableMesh. that’s why it disappear at most camera angles.
Now I resolved this issue with created an actor, and attach the poseable mesh to the actor automatically. then set the actor’s world transform with the original mesh’s world transform. then it works as I want.
I’m back to this thread tosay that while the “set bounds scale” did fix the disappearing, it absolutely kills performance and locks up the GPU. Not sure why but I ended up with a massive performance issue and this node was the cause. Beware.