constant sliding plane headache

Post: #1
Mad I'm now working with ellipsoids, a step up from bounding spheres, and i keep running into my old problem:

ill slide along my wall just fine for a time peroid for about 1 to 5 seconds, inluding around corners, and then ill slip through the wall.

When I implement the very basics of collision detection, being just stopping when too close, that allways works always, 100%, even with my ellipsoid radius.

Then, to slide, i push back my position(my position with the velocity vector added to it)i push back my position by the amount of space needed to keep my radius clear of the wall in the direction of my collision normal.

and then i always seep into the wall at some point.

any ideas?

has this happened to you?
Quote this message in a reply
Posts: 304
Joined: 2002.04
Post: #2
typer Wrote:has this happened to you?
All the time and it drove me nuts. When you push back, you cant move the object back to where its just touching the wall - you have to add a little extra fudge factor - floating point isnt exact you know and eventually little rounding errors add up and all of a sudden you are through the wall. Also, in your collision detection before you check if your object (taking into account its velocity) is going to intersect a wall at some point in the next frame - first check to see if it is *already* intersecting a wall and if so first move it back and register a collision.

I have it working almost perfectly with bounding spheres (havent gotten to ellipsoids yet). The rub is when you get into an acute corner where your object is touching two walls at once - it can get stuck since the object being pushed back from one wall gets it stuck in the other. So I have a limit on how many wall collisions can happen per frame. But getting stuck in an acute corner is still a bit wobbly.

Quote this message in a reply
Posts: 3,591
Joined: 2003.06
Post: #3
That sounds real tough to reply to without knowing more about what you're doing. The only two things that I can take a wild shot at are: I don't usually do collision calcs based on the original collision position (if I read that right), I do it every frame once detected. The other thing that sticks out is: If your collision method is correct, there might be a math error and I'd guess maybe you're pushing floating point limits too quickly or overflowing some fixed point variable when it should be a float or something. But then again, pure guess. Need more info.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  "Initializer element is not constant" for NSNumbers Coyote 5 10,911 Oct 22, 2009 09:37 AM
Last Post: OneSadCookie
  char array versus pointer to string constant question WhatMeWorry 7 10,437 Jan 30, 2007 12:26 PM
Last Post: bronxbomber92
  Box to Plane Intersection With Quaternions KiroNeem 6 8,312 Jun 25, 2006 05:44 PM
Last Post: KiroNeem
  Algorithm for moving between two points on a plane... WhatMeWorry 4 7,041 Aug 23, 2005 11:36 AM
Last Post: unknown
  Ray/Plane Intersection Point hangt5 6 22,639 Mar 21, 2005 03:05 AM
Last Post: hangt5