• Create Account

## Collision Detection for 3D platformer

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

4 replies to this topic

### #1TheAnti  Members

253
Like
0Likes
Like

Posted 19 May 2009 - 03:48 PM

I've been on an uphill battle with swept-ellipsoid collision detection for ages now. It seems like there's a new error with it evertime I turn around. I'm not sure if this type of collision is suppose to be fool proof but I don't think I should be having this much trouble. Is there a better or more common collision detection method for these types of games or is this something I'm just going to have to gut out? I'm really hoping there's a better way. [dead]

### #2Kwizatz  Members

1343
Like
0Likes
Like

Posted 19 May 2009 - 04:26 PM

Yes, SAT use an AABB, OBB or capsule to represent your characters instead of an ellipsoid, subdivide your level geometry into convex polyhedrons.

### #3OrenGL  Members

228
Like
0Likes
Like

Posted 19 May 2009 - 04:28 PM

The way I've seen collision for 3D plaformer characters done before is to use two spheres one on top of the other. The collision code is simpler (and faster). This also allows for shrinking the top sphere into the bottom one to support collision when the character crouches/balls-up/whatever.

### #4Aiursrage  Members

154
Like
0Likes
Like

Posted 19 May 2009 - 04:36 PM

Looks like you are rolling your own physics, you could look at something like Havok Physics since they have a pretty good character controller.

### #5TheAnti  Members

253
Like
0Likes
Like

Posted 19 May 2009 - 08:02 PM

Well the problem isn't the shape of the collision or physics but rather how glitchy things are and how the the entire thing falls apart if the elipsoid passes through a primitive.

I like the idea of the SAT! My level is already divided into convex polygons. Is there some sort of tutorial for using 3D capsules or something of the like against 3D triangles with it? I'm having trouble finding information doing in in 3D. I don't suppose this is one of those things that easily converts to 3D after really going into it is it?

Edit: As usual I was over thinking things. For a sphere and a triangle all you have to do is test the axis for the nearest point on the triangle to the sphere origin. I didn't realize it until I looked at this paper.

http://realtimecollisiondetection.net/pubs/GDC07_Ericson_Physics_Tutorial_SAT.ppt

I think I've got it now! Thanks!

[Edited by - AntiGuy on May 20, 2009 2:02:07 PM]

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.