Make a model behave like a ragdoll

Hey everyone.
I build one own entity. As model it has a player model/npc model. Now my problem is, that the physical hitbox dont fits to the model. The model should behave like a ragdoll. At the moment it rotates in T form around his foots. The hitbox is just a small box under his foots.

Know somebody how to di this or is it possible to use prop_ragdoll as a base for my entity?

Don’t give the entity physics, make it invisible. Spawn another entity with a class of prop_ragdoll and use that instead, thats how I do it anyway.

Well, thats probably not possible.
Or can i overwrite the ENT:OnTakeDamage() of a prop ragdoll?

No, but you can just use “EntityTakeDamage” hook instead.

Hmm, but thats no good solution. But i will try it tomorow

Thats possibly the only solution. Whats so “no good” about it anyway?

Dont know the english word for it, but translater says it is called Encapsulation.
Means that every class can only be accessed by methods and its propertys are private. In connection with gmod it means, that i want to make every weapon and every entity to work as an individual so that it doesnt need other entitys or an gamemode to work.

With your solution it needs a gamemode to work. With a “good solution” i mean a solution, where it dont need a gamemode.

But it is better to have a “not good” solution then to have no solution.

Are you saying you cant use that in the entitys code? If so: **[Hook.Add

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Hook.Add)**

Ehhhhhh… never mind^^

Thanks, =)

Kk, i tried and it doesnt work. So is there a solution how to derive my entity from ragdoll?

What exactly didn’t work?

No.