Quantcast
Channel: Bugs Latest Topics
Viewing all articles
Browse latest Browse all 760

Ray.TransformToRef doesn't normalize direction

$
0
0

Hi, I was debugging some code and stumbled upon Ray.TransformToRef and I noticed probably a bug?

The result ray's direction is never normalized unless I'm mistaken.

public static TransformToRef(ray: Ray, matrix: Matrix, result:Ray): void {
            
            Vector3.TransformCoordinatesToRef(ray.origin, matrix, result.origin);
            Vector3.TransformNormalToRef(ray.direction, matrix, result.direction);
            // This should be result.direction.normalize(); ? 
            ray.direction.normalize();
            
}

 

 


Viewing all articles
Browse latest Browse all 760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>