Character and NPC interactions

cane_student

01-11-2008 15:04:02

Hi guys,

I am currently creating a 3rd person fighting game, I have been pondering this particular issue for a while.

How do i deal with interaction between NPC and Player, i have a collsion box around the sword that will make the enemy play a reaction animation on detection but what should I do for the collision between player and enemy i would like it so that it stays infront of me and doesnt walk through me.

Anyone got any suggestion it wouldbe greatly appreciated.

Thanks

Cane

micken

03-11-2008 23:23:23

There are many posts about this, you should search the forum more thoroughly about Character collision. For most situations you will do just fine creating a primitive collision object for each of your characters (I.E. cube, ellipsoid) to cover the majority of the body.

But in your case I'm sure you will want to know when different parts of the body collide, so for this I would suggest using a convex hull collision and a CustomContactCallback to figure out which part of the characters are colliding, or seperate each part of your characters' bodies into different sections with primitive objects.