Archived

This topic is now archived and is closed to further replies.

collision detection softening

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

Recommended Posts

Alas, I am having troubles with collision detection (doesn't everybody). My collision detection code is very similar to the sphere-polygon collision code from GameTutorials. My problem is this: collisions are very jittery when the camera (or sphere) comes in contact with a corner of a wall (two adjacent polygons at a 90 degree (or other drastic) angle). As the camera slides along the wall and comes to the adjacent wall, the camera will often bounce as a result of colliding with the second polygon, when technically it shouldn’t. Here’s a picture for clarification:
camera ______
/           |        |
|        | --->
\______/
-------------------------
|
|
|
|

So, essentially, as the camera slides along wall01, the program detects a collision with wall02 and bounces the camera backwards, even though the two polygons share the same end points (which should theoretically keep the camera from bouncing). The only reason I can come up with is that the velocity of the camera is pushing the camera’s bounding sphere into the polygon. (I also have problems with this when I add a gravity vector to the camera). To temporarily solve this, I constructed the polygons so that walls have a gap in the corner. This works OK, but it’s really inconvenient. I was hoping that someone might have some better ideas on how to soften my collisions in such situations. Anyway, that was a lot of explaining, and I hope that my problem was understandable. I would greatly appreciate any help. Thanks. -Chris [edited by - odiousangel on June 1, 2002 7:13:14 PM] [edited by - odiousangel on June 1, 2002 7:15:01 PM]

Share on other sites
You might want to read this article on the collision detection and handling in MDK 2. It deals with deflection forumlas to allow "sliding" along walls.

Share on other sites
thanks, ill look into that.
and any more help would be appreciated.

[edited by - odiousangel on June 1, 2002 7:10:09 PM]

1. 1
Rutin
47
2. 2
3. 3
4. 4
5. 5

• 13
• 10
• 12
• 10
• 13
• Forum Statistics

• Total Topics
632994
• Total Posts
3009770
• Who's Online (See full list)

There are no registered users currently online

×