Path: chuka.playstation.co.uk!news From: "Mario Wynands" Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: Pls help a 3dimensional newbie... Date: Wed, 10 Nov 1999 18:40:36 +1300 Organization: PlayStation Net Yaroze (SCEE) Lines: 60 Message-ID: <80b0ek$6s4@chuka.playstation.co.uk> References: <38234722.9002B4AA@netway.at> <38286787.5587F613@which.net> <38289F81.EAB12E24@netway.at> NNTP-Posting-Host: p46-max1.wlg.ihug.co.nz X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 wrote in message news:38289F81.EAB12E24@netway.at... > Andrew Murray schrieb: > > > > I'm not 100% sure how to put this into code but I'd imagine that is you > > make a "handler" of the object then make this handler in some way always > > point towards this point, I advise taking a look at the camera viewpoint > > settings as this can be done similar to what you are looking for. > > Hmmm... > - First of all: thanx a lot for your answer! (I thought noone would read it) :D > > I'll tell you the whole story: > I have an airplane, and (of course) I want a "fireblast" (dunno the word...) > at the end. Making an object (many polys - difficult in changing textures) > seemed to be not the best solution, so I had a (little) look at > "g-police2", and I thought: "it seems, this guys just use a SINGLE poly > and turn it always toward the camera..." Ahhh, billboarding. Here is some code to turn an object towards the camera for rendering ------------ MATRIX world_matrix, screen_matrix; GsGetLwsdobj->coord2, &world_matrix, &screen_matrix); if (billboard) { screen_matrix.m[0][0] = GsIDMATRIX2.m[0][0]; screen_matrix.m[0][1] = GsIDMATRIX2.m[0][1]; screen_matrix.m[0][2] = GsIDMATRIX2.m[0][2]; screen_matrix.m[1][0] = GsIDMATRIX2.m[1][0]; screen_matrix.m[1][1] = GsIDMATRIX2.m[1][1]; screen_matrix.m[1][2] = GsIDMATRIX2.m[1][2]; screen_matrix.m[2][0] = GsIDMATRIX2.m[2][0]; screen_matrix.m[2][1] = GsIDMATRIX2.m[2][1]; screen_matrix.m[2][2] = GsIDMATRIX2.m[2][2]; } GsSetLsMatrix(&screen_matrix); GsSortObject4(dobj, ot, 14 - ot->length, (u_long *)getScratchAddr(0)); ------------ Let me know if you need more help. Regards Mario mario@sidhe.co.nz www.sidhe.co.nz