Blitz3d collision problem

Started by
1 comment, last by MSW 14 years, 5 months ago
I have been creating a 3d platformer for some time now, but i have run into a problem to do with the collision engine. I currently have two types of collision, collisions between the player and the map, and collisions between the pickups (gems hereafter) and the map. ie: Collisions(coltype_player,coltype_scenery,2,3) Collisions(coltype_gem,coltype_scenery,2,3) No matter which order i put these in the same problem occurs: If the gem collisions are enabled, the player collisions still function, but i can't get anything from them. To explain further, when i use: For i = 1 To CountCollisions(playermesh) ;count all the collisions that the player has been in if GetEntityType(CollisionEntity(playermesh,i)) = coltype_scenery Then surface = CollisionSurface(map,i) endif next Surface will always be returned as 0, and i know that there is more than one. This function works fine when either: -gem collisions are not checked -gem collisions are checked but there are no gems for the mesh to collide with Does anyone know why this is? Can blitz3d just not cope with having two sets of collisions on the same object? Ta Ps: (The only other way i can do collisions is by using meshesintersect(), which is stupidly inefficient, and would require mucho coding...)
Advertisement
Actually, i have thought of another way: copy the mesh, make the new one invisible, and have gems collide with that one.

Ineffieicnt method is ineffieicent! Help!

Edit: this method is now working, but i can tell i will run into a brick wall of issues later...
Can't you just store a list of where the gems are then do a simple sphere to sphere check with them and the player?

Heck there is even a nice little article on useing hash tables on the front page of gamedev. Could help you a lot.

This topic is closed to new replies.

Advertisement