Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: "Linda J. Hodge" Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: vectored bullets code sample Date: Wed, 07 Jan 1998 11:17:59 -0800 Organization: SCEA News Server Lines: 30 Message-ID: <34B3D4E7.21F8@earthlink.net> References: <690db8$sil1@emeka.playstation.co.uk> Reply-To: hodgke@earthlink.net NNTP-Posting-Host: 168-207-94.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 movement of the model. 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; } } Lewis this code works in all the other models to propel the object forward.I dont really know how to make the bullet in the center of the car,but i think maybe from the knowledge you just told me it would be somethin like this: thebullet.gsObjectcoord.coord.m[0][2] = thecar.gsObjectCoord.coord.m[0][2]; frmo looking at the code it looks like it puts the matrix of the bullet to the car's matrix.Is that correct?go easy on me. -Austin