3D Triangle Collision detection with ramps

Started by
-1 comments, last by C0dR 10 years, 6 months ago

Hello,

I am currently working on a student research project and have to develop a simple lemmings game.

My world is made of 3D meshes and my lemmings are simple flat meshes made of 4 vertices with textures on it (kind of 2D sprites in 3D world).

Currently I am working on the collision detection but cant get it working. I assume you know how lemmings is working, so i need to detect wether the lemmings are on the ground or colliding with a wall. I also need a ramping functionality, so i can have uneven grounds.

For collision detection i made a simple mesh in a 3D program and set it a special name (beginning with COLL_). But I just cant figure out how to get the collision detection working. I already tried the solution from here http://www.discoverthat.co.uk/games/xna-triangle.htm but its not working properly for me since I cant really detect wether the lemmings are colliding with a wall or the ground. So I also tried to seperate the collision meshes in ground meshes and wall meshes, but now when the lemmings are not colliding with the ground anymore ( walking over a cliff) they make some kind of curve and are not directly falling to the ground. I already checked if I move them horizontally before letting them fall but thats not happening. I think the problem is the BoundingSphere, since its round and not quadric?

Well, should i just try simple boundingBoxes instead of Meshes? But then i couldnt get ramps right?

Could anyone post a solution or give me some tips? I just have 2 Weeks left and dont even have the game mechanics ready sad.png

greets

C0dR

P.S. I am german so bear with me smile.png

This topic is closed to new replies.

Advertisement