Hitting different parts of body?

1 reply [Last post]
VaragtP's picture
User offline. Last seen 1 year 12 weeks ago. Offline
Joined: 02/10/2011
GBPs: 21

I wonder if its possible to have hit detection of different parts of the body when you shoot at him, maybe Head, Body, Legs of an enemy without having to make him up separate actives?

TreeHugger's picture
User offline. Last seen 8 weeks 4 days ago. Offline
Joined: 01/04/2009
GBPs: 43

I suppose you could just do it with calculations.
By that I mean check the position of the bullet on impact, find the offset from the position of the player and based on that you can work out what part of the body was hit (Head, Body, Legs, etc).
It will off course depend massively on the type of game you're making, the animations, rotations, and which body part's you need to detect.
The more in-depth you need the hit detection and the more complex your game is, then the more complicated it would be to write the hit detection system.