Skip to main content
gamedev.net
🔒 Locked

Leafy BSP collision

Started by Marius Aug 25, 2006 at 3:58 PM 0 replies 1.1k views
Original Post
Marius
Marius
I am implementing collision for Getic BSP and because Getic is Leafy BSP I inspired myself from: Quake bsp collision, Genessis bsp (they even have the same comments and functons ), Arnold engine, Apocalix, Duke, and so on... all having same BSP algorithm. There is a problem with all of them. If the floor polygon is sligthy inclined (none of the samples uses such a poly) as that UP normal component being close to 0.9990-0.9999 the collision alogrithms fails to work while walking down the plane. If you are not familiar with the aproach here a simplified version of how it works. AGAIN: Make the next destination position from curent position plus velocity*time. Drop the positions into the BSP. BSP returns collision point and hit plane. Clip velocity against the hit plane. Make curent possition = impact BSP velocity=Clip velocity goto AGAIN while there is no collision and not to many times. if many times reached you are stuck. make pos=startpos. vel=0. The clipvector function against the plane normal due to floating point precission makes the next point on forward direction to be again under the floor plane so the loop keep returnig same impact plane over and over and then you are stuck. If you have any ideea how to fix this please do so. Thanks.
MCO

Topic Locked

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

Sign in to reply to this topic.