Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: "Linda J. Hodge" Newsgroups: scea.yaroze.beginners Subject: Re: 3d vectored bullets Date: Tue, 06 Jan 1998 12:02:26 -0800 Organization: SCEA News Server Lines: 22 Message-ID: <34B28DD2.6A7C@earthlink.net> References: <34AFC5CF.5F85@earthlink.net> <34b1a9d7.13820491@205.149.189.29> Reply-To: hodgke@earthlink.net NNTP-Posting-Host: 168-228-196.ipt.aol.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0C-NSCP (Win95; U; 16bit) This is the function that performs the bullet moving: AdvanceModel(&theBullet->gsObjectCoord,&theBullet->rotation,&theBullet->speed,256); It is as follows: void AdvanceModel (GsCOORDINATE2 *gsObjectCoord, SVECTOR *rotateVector, long *speed, int nD) { MATRIX *matTmp; SVECTOR startVector; SVECTOR currentDirection; if(nD!=0){ startVector.vx = 0; startVector.vy = 0; startVector.vz = ONE; RotMatrix(rotateVector, matTmp); ApplyMatrixSV(matTmp, &startVector, ¤tDirection); gsObjectCoord->coord.t[0] +=(currentDirection.vx * nD)/4096; gsObjectCoord->coord.t[1] +=(currentDirection.vy * nD)/4096; gsObjectCoord->coord.t[2] +=(currentDirection.vz * nD)/4096; gsObjectCoord->flg = 0; } }