Path: chuka.playstation.co.uk!news From: James Shaughnessy Newsgroups: scee.yaroze.freetalk.english Subject: Re: Collision Detection Shortcut Update Date: Tue, 17 Feb 1998 12:02:51 +0000 Organization: Bacardi Ferrari V12 Lines: 68 Message-ID: <34E97C6B.646B@manc.u-net.com> References: <6caa8e$5bj12@scea> NNTP-Posting-Host: manc.u-net.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (Win95; I) To: Nathan Miller This is how I understand it anyway: A1) With Mario, (imagine if any of us could come up with a game even half as good as that on the PSX eh?), and most 'block' orientated game (especially Tomb Raider etc), I would guess that everything is done using the bounding cuboid technique (eight points). Except maybe Mario himself who might use a vertical cylinder bounding area (By using bouding box in the Y/Z axis and bounding circle in the X/Z axis perhaps) although I guess a cuboid would suffice. (Remember, a cuboid of course is not necessarily a cube, it could be a high tower, or a large flat area (eq. ground/wall collision)) Also remember that sphere-sphere bounding (two or four points) may not be as significantly faster than cuboid-cuboid (16 points) as you might think -- cuboid needs ONLY '>' '<=' type IF tests whereas spherical needs to calculate the length of a 3D vector in addition to some '<' '>=' type IF's. Anyone done tests on this? How N64's GOLDENEYE manages such perfect bullet-limb hit accuracy is another kettle of dogs. (prolly 3D geometry -- intersection of lines etc. Simultaneous equations anyone? Or can matrices do everything?) 2) I suspect that collision in 3D fighters is a LOT simpler than using a load of collision spheres all over them -- that would be too expensive I'd say. The way I would do it is just use simple logic tests based on what move one character is doing, with what the other character is doing and their distance apart (they are always either looking at each other or away (and moves are limited) so you can think of collisions in a simple 2D form.) Then all you do is match the variables with what each character's body is like (height / arm reach etc.) so it appears as though when a hit a takes place it was due to the hand literally touching the face in 3 dimensions. Which is nice. The format you use totally depends on the game -- is it mostly character-scenery collisions, or character-character? You can always incorporate combinations of all types, but the best for your game engine may not be the best for another, so I'd need more info about it to tell you what I think would be best. ttfn, Jim -- ----------------------------------------- James Shaughnessy james@manc.u-net.com http://www.netyaroze-europe.com/~shaughnj ----------------------------------------- Nathan Miller wrote: > Well, after a few responses I felt that I had been talking out of my *%&@ > and needed to apologise to everyone for my last post on collision detection. > I was thinking up an algorithm to detect collision and was oblivious to what > spherical collision detection is! Although I agree in the speed aspect of > the sphere method, I am a little concerned about the accuracy. I have two > examples: > > 1) 3D Action (Mario 64) Game- If using spherical detection when the > character jumps onto a platform wouldn't the detection be true before he/she > ever reached the actual platform? And if you use spherical detection only > as a preliminary step, all other variables for any other form of detection > must be tracked, so wouldn't it be easier to use a more accurate fom of > detection even if it takes a little more computing power? > > 2) 3D Fighting (Virtual Fighter) Game- If your character is composed of > separate parts being animated by a skeleton system the spherical system > works fine. If you have a solid mesh and you deform it in real time then > the system fails. you can place spheres all over the model, but their > location has to be tracked through translation (although the rotation > doesn't need to be tracked) so again isn't it easier to use a different > system?