• Ragdoll physics help
    5 replies, posted
I'm attempting to create a Kidnapping swep. When hit with this swep, you're ragdolled. I want the kidnappers to then be able to "drag" the body somewhere. The only problem is that you can't gravgun ragdolls. Is there any way around this?
physgun ragdolls?
But when my rag doll is created its created as world. Can't physgun world as a regular player.
[QUOTE=imMrAnarchy;47124495]But when my rag doll is created its created as world. Can't physgun world as a regular player.[/QUOTE] You can give ownership of that ragdoll to the kidnapper. Giving physgun just for this purpose is kind of pointless though ( and abusable too ), you'd better create a Skyrim-like way of dragging bodies around.
[QUOTE=Robotboy655;47125517]You can give ownership of that ragdoll to the kidnapper. Giving physgun just for this purpose is kind of pointless though ( and abusable too ), you'd better create a Skyrim-like way of dragging bodies around.[/QUOTE] Having Player:PickupObject() being called on the ragdoll works pretty well.
[QUOTE=LUModder;47126108]Having Player:PickupObject() being called on the ragdoll works pretty well.[/QUOTE] I've tried using Player:PickupObject() but it wont allow me to pick up any entities. It makes the sound like it's being picked up, but the entity just sits there. Here's my code: [CODE] function SWEP:SecondaryAttack() local ent = self.Owner:GetEyeTrace().Entity self:pickupRag(ent) end function SWEP:pickupRag(ent) if CLIENT then return end if ( ent:IsPlayerHolding() ) then print("HELD") return end self.Owner:PickupObject(ent) end [/CODE] [editline]13th February 2015[/editline] Could it be the mass of the entity? I've set the mass to 1, but still nothing. Wont let me pick up props or ragdolls.
Sorry, you need to Log In to post a reply to this thread.