collision detection

Started by jkndmiththinda, March 20, 2012, 07:17:10 PM

Previous topic - Next topic

jkndmiththinda

Hi
I am trying to do a collision detection using checkForCollisionEllipsoid. I managed to get a corrected vector upon detecting a collision through this method.

My question is, is it possible for me to get the correction in only X, Y directions excluding the Z axis? i.e. The corrected vector should not move in Z axis, I want all objects to be in the same plane.

Thanks for sharing this great engine again!

EgonOlsen

You could try to set z=0 in the resulting vector. Depeding on the colliders, this might work well or not at all. Another idea is to use different meshes for collision detection that prevent movement in z-direction because of their shape (like a cylinder instead of a human enemy for example).