• How to scale a bone or remove mesh parts?
    5 replies, posted
Hi, I and others have come to the problem where you cant scale a bone anymore. Functions like BuildBonePositions() and SetBoneMatrix() were removed and all bone manipulation has been replaced with the Bone Manipulator. The problem here is, that the Bone Manipulator and its functions like ManipulateBonePosition only work on NPC's or ragdolls. So now I ask, does anyone have any idea how one could modify bones to set the scale to 0 for example, or maybe how to hide/remove parts of the mesh? Or even better, make the Bone Manipulator apply to normal entities with bones as well? Thanks for any advice.
I'm not really sure how this works but I just took out a tiny part of the inflator code and it does work. I guess it's not fit for your purpose though. Do you need it clientside or for a gamemode or something? [lua]function RemoveHead( ply ) timer.Simple( 5, function() ply:ManipulateBoneScale( ply:LookupBone("ValveBiped.Bip01_Head1"), Vector(0,0,0)) end ) end hook.Add( "PlayerLoadout", "RemoveHead", RemoveHead)[/lua] I've seen someone else ask about this yoo, What's wrong with the code I'm using?
There's nothing wrong with it. It just won't work on clientside entities or anything but NPCs or ragdolls according to OP.
Works on players too. What else would you need this on? Hats and stuff?
[QUOTE=kp3;38221038]Works on players too. What else would you need this on? Hats and stuff?[/QUOTE] clientside stuff
function Derp.PlayerDeath( ply ) local xEnt = ply:GetRagdollEntity() if( IsValid( xEnt ) ) then xEnt:ManipulateBoneScale( xEnt:LookupBone("ValveBiped.Bip01_Head1"), Vector(0,0,0) ) print( "trying to rescale head of " .. tostring( xEnt ) ) end end hook.Add("PlayerDeath", "Derp.PlayerDeath", Derp.PlayerDeath)
Sorry, you need to Log In to post a reply to this thread.