I’m trying to create a non-moving, fully cloned ragdoll of a player’s position and angles.
Here’s what I tried:
local ply = Entity(1)
local rag = ents.Create(“prop_physics”)
rag:SetKeyValue( “origin”, ply:GetPos().x … " " … ply:GetPos().y … " " … ply:GetPos().z )
rag:SetSolid(SOLID_NONE) rag:Spawn() rag:Activate() rag:SetMoveType(MOVETYPE_NONE) rag:SetCollisionGroup(COLLISION_GROUP_WEAPON) local phys = rag:GetPhysicsObject() if IsValid(phys) then phys:EnableMotion(false) phys:EnableGravity(false) end
The torso holds still, but the rest of the body slumps down from T-Pose when it spawns.
Should I loop through all the bones, disabling motion and setting their angles?
What do you think I need to do?
If all else fails I was thinking I could just gesture the player into T-Pose and then spawn a ragdoll in T-Pose to sync it.
Another option I considered was to make a nextbot and set the model to the players and set the same animation sequence that the player was doing, but I want to avoid this because I think it would lag the server.
Thanks for your help.