Skip to main content
gamedev.net
🔒 Locked

Working coll. detection

Started by tiutiu 1 reply 450+ views
Original Post
tiutiu
tiutiu
I''m currently writing my collision detection routine and it doesnt works. I use an ellipsoid surrounding the character, so i get a change-of-basis matrix to transform all vertices and i get a 1 unit radius sphere (character) so collision turns to sphere-plane. I''m using the coll. detection algorithm in CameraWorldCollision tutorial of gametutorials.com, but i get weird results like character sliding thru the floor or walks thru corners. I found another coll. detection routine in http://www.peroxide.dk/download/tutorials/tut10/pxdtut10.html but i get stuck and i cant move. So, my question is: do you know any coll. algorithm when colliding with CORNERS? Thank you
Lillebror
Lillebror
I use D3DXSphereBoundProbe to check for corner collisions.

If I'm closer to the plane of a triangle than my "player radius", but not inside the triangle, then I do a check against all three sides (lines) of the triangle.

If the player sphere is intersecting with a line, I create a plane (D3DXPlaneFromPointNormal) originating at the intersect point (closest on line), with a normal from that point towards the player position . This is the sliding plane.

Take a look at http://www.gamedev.net/reference/articles/article1026.asp, that's where I learned about it.

I hope this helps.

EDIT: I realized this isn't the DirectX forum, but those function names can be helpful anyway I guess.

[edited by - Lillebror on December 11, 2002 9:36:19 AM]
Punty50
Punty50
This question will probably get a far better response over in the math and physics forum, since this is a math problem. I would first search all of the previous posts, I believe we had ellipsoid collision detection a while back on there.
Brendan
Brendan"Mathematics is the Queen of the Sciences, and Arithmetic the Queen of Mathematics" -Gauss

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.