Deflating bones on a ClientsideModel, having weird issues

This picture pretty much sums it up, I’m trying to make a clientside head gib using a physics model which is about the size of a head, and a clientside model. But whenever I deflate all the main bones attributed to physics objects, there are still some bits left that I can’t deflate because the head seems to be parented to them.

On the left, you have a ragdoll with everything deflated except the head. On the right, you have a NPC with the exact same bones deflated. I’m having that exact same issue when doing that on a clientside model. Any idea why?
I’ve already looked at the source code from GibSplat, it’s very helpful, but since it’s based on ragdolls, it doesn’t have the issue I’m having right now. Also, I want to keep this fully clientside, nothing should be done on the server, so unless there is a way to spawn clientside ragdolls, I’d like to stay with the clientside model method.

I remember that I tried placing citizen heads on a combine guy. I tried everything and I came to the conclusion that it was impossible due to lumps.

But not all hope is lost. The latest update added ClipPlanes. You can maybe try using those?

Use :SetBonePosition() to move all the bones inside the head.

I know your method, it doesn’t work here.

I guess I’ll try that, though the part where it gets clipped will kinda look ugly since you can see through it. Bah, better than nothing.

As a matter of fact it does, all the scaling/moving is client-side in both cases. (I’ve tested myself during GS2 development)

I had this problems when developing GibSplat aswell.

But you’re using ragdolls, here I’m using a ClientsideModel, which doesn’t have physics, and apparently, they behave differently when you mess with their bones, and I have no idea why. And if you had the exact same problem as mine, how the hell did you get rid of that torso part? If I scale it down to 0, the head disappears as well, that’s kinda embarrassing.

Physics have nothing to do with bonescaling. It works on ClientModel as well.

I had a play with the head thing and I talked to ralle. He told me to put the bones inside the head and it worked.

here’s the code:

if head and head:IsValid() then head:Remove() end

head = ClientsideModel(“models/player/Group01/male_06.mdl”)

local bonelist = {

function head.BuildBonePositions(entity)
local headmatrix = LocalPlayer():GetBoneMatrix(LocalPlayer():LookupBone(“ValveBiped.Bip01_Head1”))
for key, bone in pairs(bonelist) do
local index = entity:LookupBone(bone)
local matrix = entity:GetBoneMatrix(boneIndex)
entity:SetBoneMatrix(index, matrix)

hook.Add(“RenderScene”, “PlaceHead 2”, function()

local position, angles = LocalPlayer():GetBonePosition(LocalPlayer():LookupBone("ValveBiped.Bip01_Head1"))
local x = angles:Up() * 0  
local y = angles:Right() * 0
local z = angles:Forward() * -65

angles:RotateAroundAxis(angles:Forward(), -90)  
angles:RotateAroundAxis(angles:Right(), -90)  
angles:RotateAroundAxis(angles:Up(), 0)  

head:SetPos(position + x + y + z)


What it does is that it places the head ontop of your head. It looks like this taken from a good angle:

If you’re using for i = 30 or whatever number to scale all bones, don’t. I’ve tried it and it ends up looking like the model on the left.

Hope it helps!

Damn, thanks a bunch, looks like I didn’t use the right bones then. :v:
Have some hearts. :love:

Okay, it’s kinda working except a small part of the torso seems to be still there, and I have no idea how to get rid of it. If I scale down the neck, the head disappears as well, and there isn’t any other bone that I can scale down without screwing everything up.

Lol, lopping heads off is artistic :smiley: