Author Topic: collision detection  (Read 1893 times)

Offline jkndmiththinda

  • byte
  • *
  • Posts: 4
    • View Profile
collision detection
« on: March 20, 2012, 07:17:10 pm »
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!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: collision detection
« Reply #1 on: March 21, 2012, 06:46:11 am »
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).