B3D Collision Bug ?

Blitz3D Forums/Blitz3D Beginners Area/B3D Collision Bug ?

CodeOrc(Posted 2008) [#1]
Hi Everyone,

So I have an issue that is intermittent and serious.

At random my monsters fall through my terrain, and sometimes so does my character.

So I built a basic floor x=500, z=500 (W,L) to use a test bed for my game in the event that my 3D Max generated>b3dpipeline>terrain.b3d had some odd anomalies.

I am using the typical Radius,Coll Type, and so on that is default for this sort of thing.

My monsters and player character still at random times fall through. The odd thing is it seems to happen when I have alot of stuff happening like fragging 20 monsters at a time running for my life.

Does B3D Default collision have issues?

I'd post my code, but it is spread over 12 modules, and over 20k lines so it would be next to impossible to post here.

What do you pros do for collision stuff besides the default?

thx for your time.


KillerX(Posted 2008) [#2]
I think it has to do with terrains. They change based on location. Try seing if that happens with a mesh terrain.


CodeOrc(Posted 2008) [#3]
My Terrain is a MAX export.

I did however try it with B3D Terrain>Heightmap creation and so far no issues....but I really do not want to re-create my entire world using Heightmap generated land.


KillerX(Posted 2008) [#4]
That's strange. I would have expected it the other way around. I have no idea what's causing it then.


Nate the Great(Posted 2008) [#5]
hmmm... in our project Rumbling darkness we had a similar problem because the levels were made with too many seams and too many unnecesary polys... I think if you clean your map up a bit it will fix it unless it is already clean.


Matty(Posted 2008) [#6]
Assuming you haven't done anything wrong in your code the only thing I can think of is that you may be too far from the origin. Floating point inaccuracy becomes common at large distances from the origin (0,0,0) - simply the nature of how the PC handles single precision floating point numbers. I cannot remember how many significant figures a single precision float can handle but I think it is about 6, or put another way '1 part in 10000' or something.

Alternatively, maybe your mesh has polygons which are reversed, collision detection in blitz, against polygons, is against the front of the polygon unless flag 16 is set using entityfx (same as with rendering them).

How small are your characters/entities in comparison to the world space?


Ross C(Posted 2008) [#7]
Could be a scale issue. Or, your terrain is made up of segments?


SLotman(Posted 2008) [#8]
Since the problem happens when there is too many things going on... are you using time-based movement?

If so, maybe your gravity (or something else) is moving too much down, and the player is "moved" below the terrain; try putting a fixed FPS using timers, with a very slow fps (like 10-20 for testing) and see if they fall through.


CodeOrc(Posted 2008) [#9]
My world space starts at 0,0,0 and goes to 500,20,500.

My grav# pulls down at .035, and my radius for my char is 5, and monsters is 6.

I am using a set 30 FPS using Marks Tween code. My terrain is only 5k polys exported from MAX as 1 piece of mesh.

All my monsters and characters starts out just a hair above the terrain to prevent falling through it on load up. And they all move at .3 in the X direction.

Lastly, the MAX exported mesh, I take it into Giles and LM it, then export it. Other than that it is a "plain Jane" terrain.

So, my char is small, my monsters are small, my world is small (in terms of XZ width) so I am at a loss as to why it is happening.


Mahan(Posted 2008) [#10]
I remember when playing with collisions once i got very strange results on a mesh - terrain collision. After a while I realized that the terrain itself was made up of a few sub-meshes. After I used the recursive parameter of "EntityType entity,collision_type[,recursive]" everything worked like charm.

It's something worth checking at least.


grindalf(Posted 2008) [#11]
I had this problem with a racing game I made once.
it only seemed to happen when I sat still for a while, one of the spheres handling the angle of the car would fall through the track for no apparent reason.

I was useing the code from the blitz built in examples and a .x low polly level made in deled. I know that it wasent always on seams when it happend.
I never figured out what was happening.


puki(Posted 2008) [#12]
I am of the opinion that this can be graphics card related.

Many people complained of falling through the terrain in Morrowind - it never happened to me (and I played it for months); therefore, I concluded that it had to be graphics card related.