jPCT-AE - a 3d engine for Android > Support

Does scale affect the Ray-detection?

(1/1)

kiffa:

--- Code: ---mRoad.scale(5);
SimpleVector d = new SimpleVector(0, -1, 0);
float frontHeight = mRoad.calcMinDistance(front, d, 100 * 30);
mRoad.setScale(1);

--- End code ---


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

--- End code ---

Are the 2 codes above equal or not?  What's the situation when invoking mRoad.enableLazyTransformations()?

EgonOlsen:
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.

Navigation

[0] Message Index

Go to full version