# Collision detection with mesh

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

## Recommended Posts

HI ! How to handle collision detection with a mesh representing the world ? I am making a racing game and I import the level from 3ds it contains some loops and some other cool stuff the problem I have is how to handle collision detection between my car and the level ?? I have built an octree and I perform some ray - triangle intersection but for the looping how to prevent that the car goes on top of the loop

_*_ <--- the car
/   |
|   |
__\_/_____


I have another pb this is with some jump
          _______
/    * <--- the car arrive just below the level how to prevent that the
____/            collision detection put the car above?



##### Share on other sites
I did an image that explain more the problem here :

##### Share on other sites
If I understand your problem correctly, then you'll have to cast your intersection ray from a local orientation instead of globally.

##### Share on other sites
Well, if the you keep track of the direction and speed of the car then you could dedect when an unusual jump in the cars postition would occur and take the other intersection,

• 10
• 15
• 14
• 18
• 15