problems of designing a Real-Time Collision Detection System

Started by
1 comment, last by q3805508 11 years, 9 months ago
(I am not an English speaker,I hope you can understand my words)
I am designing my Collision Detection System for my Engine and I got some problems. First I think it is OK to detect Object-Object collision by just test if their Bounding Volume(AABB in my engine) collide,but it is not enough for Ray-Object case.When I want some more accurate results I have to lock the vertex buffer and index buffer of the geometry and test all triangles against the ray in object space.I am been told that locking the buffer of rendering geometry is inefficent so I want to find some way to get more approximate results for ray-object collision but not to lock the buffer of the geometry.Maybe I should use tighter bounding volume like k-DOP and convex hull but I think It didn't work well when the geometry is very concave.
I will be very grateful if you can give me some suggestions.
Advertisement
You should maintain a copy of the mesh in memory for collision detection so that you do not have to lock the vertex buffer each frame. It is actually quite common to use different meshes for collision and rendering. The rendering mesh should be very detailed and also contains some visual only elements while the mesh used for collision is usually much simpler so that the collision detection calculation is faster.

You should maintain a copy of the mesh in memory for collision detection so that you do not have to lock the vertex buffer each frame. It is actually quite common to use different meshes for collision and rendering. The rendering mesh should be very detailed and also contains some visual only elements while the mesh used for collision is usually much simpler so that the collision detection calculation is faster.

Thank you very much
It sounds like a good solution.
(I can't find "reply" button so I clicked "report" button by mistake I hope it will not get you into trouble ,sorry for that)

This topic is closed to new replies.

Advertisement