haestflod Posted February 14, 2017 Share Posted February 14, 2017 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(); } adam 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 14, 2017 Share Posted February 14, 2017 Correct! I'll fix it thank you very much:) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.