Small collision fix (0.41)

BlitzMax Forums/MiniB3D Module/Small collision fix (0.41)

simonh(Posted 2007) [#1]
Change lines 519-521 in TCollision.bmx from this:

				ent.collision[i].nx#=collisionPackage.surf.TriangleNX#(collisionPackage.tri)
				ent.collision[i].ny#=collisionPackage.surf.TriangleNY#(collisionPackage.tri)
				ent.collision[i].nz#=collisionPackage.surf.TriangleNZ#(collisionPackage.tri)

To this:

				ent.collision[i].nx#=slidePlaneNormal.x
				ent.collision[i].ny#=slidePlaneNormal.y
				ent.collision[i].nz#=slidePlaneNormal.z

This provides more accurate collision normals. It probably won't affect many people but for games like mine which implement ball physics, it's an essential fix.

I've been spending the last couple of weeks or so implementing Blitz3D's collision routine but to be honest there is very little difference, if any, between it and the exisiting routine. I will probably still include it in a future release though and leave it up to you which routine you wish to use.


Amon(Posted 2007) [#2]
I'm using the module version. If I edit MiniB3D.bmx in the mod folder do I need to rebuild modules.?

Thanks for your continued work on this by the way. :)


simonh(Posted 2007) [#3]
Yeah you'll need to rebuild it.