Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: Rotating about an arbitrary axis? Date: Fri, 18 Sep 1998 17:39:18 +0100 Organization: Sony Computer Entertainment Europe Lines: 22 Message-ID: <36028CB6.F017A2D5@scee.sony.co.uk> References: <36028A8D.290E@manc.u-net.com> NNTP-Posting-Host: mailgate.scee.sony.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5b1 [en] (Win95; I) X-Accept-Language: en James Shaughnessy wrote: > > What I need is to know what matrix transformation I need to apply to > a ball so it will rotate in the direction it is moving: eg. Well, firstly, to answer your question, you need to 'roll' about the X axis and then the Y for the direction of the ball. Use RotMatrixX(RollAmount) followed by RotMatrixY(CompassDirection) to create such a matrix. Secondly, just an observation... Why are you using 3D for the balls? Wouldn't sprites be faster? I guess you must be going for proper lighting or something... Cheers, James -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Developer Support Engineer - Sony Computer Entertainment Europe Ask not for whom the bell tolls, let the machine get it.