Fighting
#1
Posted 29 October 2009 - 11:53 AM
Any one know how to do fighting in 3D(Detecting collisions for punch and kick).My entities having bounding box for each bone and also have overall one.
If anyone knows any pointers towards this please help me.
Thanking You
Rajesh
#2
Posted 29 October 2009 - 03:00 PM
#3
Posted 29 October 2009 - 06:58 PM
#4
Posted 29 October 2009 - 07:25 PM
#5
Posted 30 October 2009 - 08:11 AM
Alphadog
I am using third person view camera.it is possible to convert 2d polygons for checking collisions.
Using spheres for collision between two bones is ok.But how to detect direction of the object hit.Example(object is standing and facing north direction i am punching the object from south direction(behind)).
Please help
#6
Posted 30 October 2009 - 11:30 AM
#7
Posted 30 October 2009 - 12:08 PM
Quote
I haven't played a lot of these games, but the ones I did seemed to use this style. It was a matter of timing. If the character was in the forward part of the swing, you need to be in a block. If he was in the rearward part of the swing then you need to punch in order to score. I guess it would depend if you were using preset animations or physics based. Physics based might get pretty complicated. Nothing has to be that perfect because it's happening pretty fast. Personally, I think having some type of rules that the player can understand would be more important.
#8
Posted 30 October 2009 - 01:02 PM
rajesh kumar said:
Yes, it is possible. Games like Street Fighter and Doom operate this way. You can project 3D into 2D and collision test from that. There are a lot of tuotrials on the net on this.
Also, if you need a lot of power and/or if you also need to introduce physics, you can always use a library like SOLID, Box2D or Bullet (3D).
#9
Posted 30 October 2009 - 02:33 PM
But fighting games are probably harder than shooting games.
What you need is per triangle per triangle detection then operate on switched on damage frames and switched off damage frames, and inert and invincible frames.
#10
Posted 30 October 2009 - 06:33 PM
rajesh kumar said:
Using spheres for collision between two bones is ok.But how to detect direction of the object hit.Example(object is standing and facing north direction i am punching the object from south direction(behind)).
Please help
Imagine your character is constructed of spheres. For instance 4 intersecting spheres for the forearm; a couple of sphere for the upper chest so forth. You can then group those spheres into a hierarchy by body parts. For instance you can put a sphere around the forearm that contains the four other spheres. This is not a collision sphere it's simply a container for the others and is used for a rough check. In the same way you have a sphere around the entire character. You just have to make sure it's big enough so your character animations don't cause any sub-spheres to go outside of it. Doing it this way you don't use bounding boxes at all; AABB or otherwise. I use a similar system for my terrain and it works well.
Spheres are nice in 3D because it is inherently easy to calculate collisions between them. If you increase the radius of one sphere by the one you are checking it with, you now have a point sphere collision test. You can then sweep a point by some increment according to your animation to do the collision. Keep in mind that checking two moving objects is the same as holding one steady and moving the other one. It's all relative.
As for the direction of the hit, if a point hits a sphere simply generate a vector from the centre of the sphere to the contact point.
There are a lot of details to all this. Doing full 3D animated characters with real collisions is non-trivial. Check out http://www.naturalmotion.com/ for some truly impressive stuff. Good luck.
#11
Posted 31 October 2009 - 10:44 AM
#12
Posted 31 October 2009 - 12:37 PM
#13
Posted 02 November 2009 - 04:03 PM
In a fighting game (I'm assuming a Street Fighter kind of game) having inaccurate detection can be quite detrimental because, quite frankly, the whole game is centered on collision detection. Players won't know enough to specifically point to the faulty oversimplified CD, but it will play a role in their dissatisfaction.
#14
Posted 03 November 2009 - 09:01 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












