Jump to content
  • Advertisement
Sign in to follow this  
The Rangeless mage

Blitz3d collision problem

This topic is 3256 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...)

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!