Archived

This topic is now archived and is closed to further replies.

redcliffe

Rotation matrix problem

Recommended Posts

I''ve got a class that does 4x4 matrices, and can multiply vertices by matrix''s. I set a Z rotation matrix, with an angle of 22.5 * i. i is the row of my skydome with 0 being the zenith, and 4 being the horizon. My problem is that the horizon is not exactly where it should be. The horizon should be a y = 0. Here''s an output of my coordinates. 0, 100, 0 -37.4607, 92.7184, 0 -69.4658, 71.934, 0 -91.3545, 40.6737, 0 -99.9391, 3.48995, 0 My plan is to then use a Y rotation matrix to rotate vertices around each row. How can I get the Y of my horizon to be right at 0? It should basically be 100, 0, 0. I can post code if necessary, but please tell me what code to paste. Thanks, David

Share this post


Link to post
Share on other sites