Jump to content
  • Advertisement
Sign in to follow this  
Kitasia

Collision Detection for 3D platformer

This topic is 3498 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
Yes, SAT use an AABB, OBB or capsule to represent your characters instead of an ellipsoid, subdivide your level geometry into convex polyhedrons.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Looks like you are rolling your own physics, you could look at something like Havok Physics since they have a pretty good character controller.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!