by solarsnowfall » Tue Dec 06, 2005 0:34
Slight revision. Updated the calculations to factor in Z distance. The total distance calculated is a true 3d distance now. Before it only measured a distance based on the X and Y positions, wich means the light fading would not be effected at different Z ranges. Like a right triangle, side A is the XY distance, side B is the Z distance, and the 3d distance is calculated as the hypotenuse.
Slight revision. Updated the calculations to factor in Z distance. The total distance calculated is a true 3d distance now. Before it only measured a distance based on the X and Y positions, wich means the light fading would not be effected at different Z ranges. Like a right triangle, side A is the XY distance, side B is the Z distance, and the 3d distance is calculated as the hypotenuse.