www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: Anton on June 05, 2015, 09:37:50 am

Title: ELLIPSOID_ALIGNED vs ELLIPSOID_TRANSFORMED
Post by: Anton on June 05, 2015, 09:37:50 am
Can some explain what the difference between this options? Because the documentation is not clear how the ellipse will be transformed when performing collision detection with ELLIPSOID_TRANSFORMED options.
Title: Re: ELLIPSOID_ALIGNED vs ELLIPSOID_TRANSFORMED
Post by: EgonOlsen on June 05, 2015, 11:01:56 am
ELLIPSOID_ALIGNED, which is the default, means that the ellipsoid's axes are aligned to the axes in world space no matter what the rotation of the object is that is checked for collision. ELLIPSOID_TRANSFORMED takes the object's rotations into account. For example: If you have an egg (I'm using this as an example, because it's pretty easy to approximate by an ellipsoid...) that moves through the world while standing upright, both ways will work the same. But if the egg falls over, it's different. The _ALIGNED method will still use the ellipsoid as if the egg were still standing upright while the _TRANSFORMED method will take the egg's new orientation into account.
However, using the aligned method is way faster and better to handle than the transformed way. Whenever possible, stick to the aligned method. Personally, I've never used the transformed method for anything other than test cases.
Title: Re: ELLIPSOID_ALIGNED vs ELLIPSOID_TRANSFORMED
Post by: Anton on June 05, 2015, 11:25:05 am
Egon, thanks for prompt response.
Now everything is clear.