nel-all
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nel] Move Primitives and Cameras


From: Geraldine Deberdt
Subject: [Nel] Move Primitives and Cameras
Date: Tue, 29 Apr 2003 11:48:56 +0200 (CEST)

Hello,

I'm trying to make my camera collision against walls instead of going
through them. So I created a move primitive associated to the camera, and
placed it at each frame where the camera's eye is. There are good
collision meshes where walls are.

Here is my test (based on snowballs source code, the camera is placed
behind the gnu and follow him) but it doesn't work :

// Replace the move primitive at the camera's eye position (cpos) except
for z
// if collision z position is 10.0f else 0.0f
Camera->mMovePrimitive->setGlobalPosition(CVectorD(cpos.x, cpos.y, cpos.z
+ 10.0f),0);
                        
// Collision test
if (Camera->mMovePrimitive->getFinalPosition(0).z != 0)
    //move camera nearer from the gnu
else
   //normal camera position, behind the gnu

Does anybody have an idea about what is wrong??
I'm not sure my use and my test of move primitives are good.

Thanks.


___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran├žais !
Yahoo! Mail : http://fr.mail.yahoo.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]