www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: jkndmiththinda on March 20, 2012, 07:17:10 pm

Title: collision detection
Post by: jkndmiththinda 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!
Title: Re: collision detection
Post by: EgonOlsen 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).