www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: kiffa on November 05, 2013, 04:32:51 am

Title: Does scale affect the Ray-detection?
Post by: kiffa on November 05, 2013, 04:32:51 am
Code: [Select]
mRoad.scale(5);
SimpleVector d = new SimpleVector(0, -1, 0);
float frontHeight = mRoad.calcMinDistance(front, d, 100 * 30);
mRoad.setScale(1);

Code: [Select]
SimpleVector d = new SimpleVector(0, -1, 0);
float frontHeight = mRoad.calcMinDistance(front, d, 100 * 30);

Are the 2 codes above equal or not?  What's the situation when invoking mRoad.enableLazyTransformations()?
Title: Re: Does scale affect the Ray-detection?
Post by: EgonOlsen on November 05, 2013, 10:27:09 am
No, they are not equivalent. The result might be the same if the scale doesn't change the height of the road but in any other cases, the scale will affect the outcome.
Lazy transformations don't change the outcome.