Jump to content


- - - - -

BSP Collision detection


2 replies to this topic

#1 riksweeney

    New Member

  • Members
  • Pip
  • 3 posts

Posted 01 December 2005 - 08:31 PM

Hi,

I've implemented BSP collision detection based upon Nathan Ostgard's tutorial but am having a problem.

Basically if my movement takes me onto the plane, but not over it, then the code thinks that a collision has not occured and will allow me to move through it on the next movement. This essentially means that you might randomly fall through the floor.

Has anyone used his tutorial and experienced the same problem?

Thanks

Richard

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 5308 posts
  • LocationSanta Clara, CA

Posted 01 December 2005 - 08:51 PM

I admit I'm not familiar with the tutorial in question, but it sounds to me as if this might be a precision issue. Perhaps if you stop the movement just before actually hitting the plane, so that you remain a small distance (e.g. 0.0001) away from it, this will prevent the falling through the floor problem.
reedbeta.com - developer blog, OpenGL demos, and other projects

#3 ikk

    Member

  • Members
  • PipPip
  • 87 posts

Posted 03 December 2005 - 11:07 PM

hello.
i had this problem and solved it as Reedbeta saying.
this is important also bcos when moving forward against plane, at the moment when
intersection occurs new position is corrected, and this position is for current frame. but u can still hold forward button and in next frame whole intersection algoritm is calculated again, thus when position is set to 0 distance from plane, algoritm in next frame may fail bcos new distance is calculated incorrectly.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users