Author Topic: ELLIPSOID_ALIGNED vs ELLIPSOID_TRANSFORMED  (Read 552 times)

Offline Anton

  • byte
  • *
  • Posts: 7
    • View Profile
ELLIPSOID_ALIGNED vs ELLIPSOID_TRANSFORMED
« 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: ELLIPSOID_ALIGNED vs ELLIPSOID_TRANSFORMED
« Reply #1 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.

Offline Anton

  • byte
  • *
  • Posts: 7
    • View Profile
Re: ELLIPSOID_ALIGNED vs ELLIPSOID_TRANSFORMED
« Reply #2 on: June 05, 2015, 11:25:05 am »
Egon, thanks for prompt response.
Now everything is clear.