Path: chuka.playstation.co.uk!news From: Majik Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: libps - RotMatrix() Date: Fri, 26 Oct 2001 14:52:05 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 38 Message-ID: <3BD96A85.63980F0C@127.0.0.1> References: <3BD923D9.872FC1A0@127.0.0.1> <9rbol5$2i3@www.netyaroze-europe.com> NNTP-Posting-Host: tide136.microsoft.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.72 [en] (Windows NT 5.0; I) X-Accept-Language: en Martin Keates wrote: > > That makes y roll not pitch, and x,y,z is basically pitch, roll and yaw. > > > RotMatrixX(x, mtrx); > > RotMatrixY(y, mtrx); > > RotMatrixZ(z, mtrx); > > This is not quite right. probably not, I was doing this from memory, after having left a screen full of 'GPU unsupported code 0..' at 2:00am last night ;) > Also, you need to make sure you keep your rotations within a > suitable range. Anything for roll and yaw, but pitch needs to be > within -90 to 90 degrees. the roll is limited to be just a banking angle, so the plane (and viewpoint) leans into corners, the direction (yaw??) the planes move in, and the pitch are unbounded. > I don't think you'll get any sort of Gimbal Lock problem here. I think that's what I encountered, and eliminated. > When > pitch is +/- 90 degrees the plane will be vertical so you probably > won't want it to be moving along the y axis. But it should have the > correct orientation. it seems to work as expected now. > Presumably you move the planes on the > z-axis as well as the y-axis depending on their pitch. You could > get the direction vector of the plane by putting (0,1,0) through the > rotation matrix. transposition matrix is made up from taking the pitch and yaw angles, and combining them with a fixed distance and putting the whole lot through a spherical to cartesian coordinate transformation. It sems to work :D M.