Just wondering if anyone knows if GoSsE Korupted's nPoly routines (http://www.blitzbasic.com/Community/posts.php?topic=36003) are sound.
I've started using them for collision detection in my 2D (in 3D) shooter and most of the time it's okay, but occasionally shots will pass right through enemies.
The first thing I thought was that the shots were passing over the enemies (moving so far in a frame that they never actually touched the enemy) but debugging has proved this not to be the case (when it happens shots are moving no more than 16 pixels in a frame and the enemy is 45 pixels wide, plus shots can pass within 10 pixels on the sprite's handle and nPoly doesn't trigger a collision).
I can't get my head around the maths in the nPoly routines (I'm not a maths person at all) so I'm wondering if anyone else has used them or understands them and could let me know if they're sound or not.
I've started using them for collision detection in my 2D (in 3D) shooter and most of the time it's okay, but occasionally shots will pass right through enemies.
The first thing I thought was that the shots were passing over the enemies (moving so far in a frame that they never actually touched the enemy) but debugging has proved this not to be the case (when it happens shots are moving no more than 16 pixels in a frame and the enemy is 45 pixels wide, plus shots can pass within 10 pixels on the sprite's handle and nPoly doesn't trigger a collision).
I can't get my head around the maths in the nPoly routines (I'm not a maths person at all) so I'm wondering if anyone else has used them or understands them and could let me know if they're sound or not.