Path: chuka.playstation.co.uk!news From: SCEE Developer Support Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: The camera Date: Mon, 21 Apr 1997 12:33:05 +0100 Organization: Sony Computer Entertainment Europe Lines: 45 Message-ID: <335B5071.1356@interactive.sony.com> References: <335770aa.132437@news.playstation.co.uk> NNTP-Posting-Host: 194.203.13.10 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (Win95; I) Alex Amsel wrote: > > Can someone answer a quick question? > > I was playing around with the gsview stuff yesterday (not well > documented) and I realised I really wasn't sure of a number of things! > > 1) Some demos uses lw and ls, others just use ls. Howcome, and what is > the real difference? > 2) When calculating lw/ls do you pass the pointer to the objects > GsCoordinate2? > 3) I thought gsview2 would allow me to point the camera somewhere and > translate it. I was wrong of course! So I have linked it to a GsCoord2 > which I can then move around an environment. However, how can I move > the camera along the axes of a local coordinate system ? It is > probably something obvious but I did a few combinations and didn't get > it. However, it was 7am this morning! > > Regards > > * Alex Amsel * Into Beyond Web Design & JAVA Programming * > * http://www.intobeyond.com * WWFC Utter Rubbish 1996-7* > MM - "Steve Corica is every bit as good as that Kinkladze" Viewing is done under one basic setup with two ways to manipulate in software; GsVIEW or GsRVIEW. GsRVIEW2 uses: a pointer to super coordinate system to specify the viewing space; viewpoint and looked-at point in that space; and a view-orientation angle specifier. Easiest way to move a view along the axis of a local coordinate system: set view.super to the coordinate system of the object (the GsCOORDINATE2 structure), set the reference (looked-at) point to the centre of the object (ie 0, 0, 0 in that coordinate system) and the viewpoint to the object's z axis (0, 0, K in that coordinate space). Then you will look along the object's z axis, towards the object itself. If it doesn't seem to work, make projection distance variable by controller; too-high projection will result in your object being clipped for being too-close-to-view. The solar and solar2 demos do alot of (albeit unpolished) viewpoint manipulations (local, external, circling, flyby). Lewis