• Register
Post news RSS Ragdoll Deathmatch: Milestone 2

We have completed hit detection (we just have to test it)! Here we describe how it works.

Posted by on

RDM has reached milestone 2! What is that milestone you ask? Why, it is hit detection!

Hit detection is normally done by traces from a gun straight ahead until it hits something. If it hits a player, they take damage. Since we aren't using guns, we cannot do anything even close to this.

Since we don't want to do a bunch of traces on every think (that would lag a LOT), we decided to add another entity (rdm_hitbox) to go on hands and feet. This is a basic entity that will not collide with anything while having a shape and size (a box).

On a physics collision, rdm_hitbox ignores the collision UNLESS it is a ragdoll that another player is controlling. If it does hit another player, it checks a table of multipliers (so that if you hit someon's head, it does 3 times the damage...) and then takes away their health.

Our next milestone: Powerups!

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.