ManipulateBonePosition() and BuildBonePositions hook don't work with ragdolls
I've noticed that ManipulateBonePosition() doesn't completely work with ragdolls and the BuildBonePositions hook doesn't work with ragdolls at all. When you use ManipulateBonePosition() with a ragdoll, most bones refuse to move. I'm not sure if it's supposed to be that way, but I find it weird and I kind of want to use this code in my Dismemberment Mod. Also, I've noticed that when ManipulateBonePosition() is used on a clientside model, you have to use the code on every single bone and set each bone offset to a zeroed out vector before using the code again for it to work properly. However this does not appear to be the case when using ManipulateBonePosition() on NPCs and players. I've tried the same thing with ragdolls as well, and I had no luck.
And for the BuildBonePositions hook, I haven't tested it out with scripted entities, but I have tried to use it with ragdolls, clientside models, and players. It only worked on players when I used the AddCallback() code and I'm sure it works with NPCs too.
prop_ragdoll and hl2mp_ragdoll have internal classes that actually manage the bone data of the ragdoll. Since they don't call their BaseClass' SetupBones under most conditions, manual hook calls and ManipulateBone* function redirections might have to be added there. Really, ragdolls should just have their own metatable added at this point.
Bump.
Please fix this. It's over a decade old bug at this point.
I don't think it can be fixed? Bone positions of ragdolls are dictated by the positions of their associated Physics Objects, not the other way around.
Is there an alternative solution in which we could manipulate the physics objects instead for the same effect? Modify the constraints maybe?
That all sounds really hacky though…and probably won’t work on the client
I mean, if you want to manipulate physics objects, just do that, you have SetPos, etc.