Please check my response to this last week.

Dave

-----Original Message-----
From: Thomas Gilbert Giusepe [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 10:39 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Problems with lookAt


Hi there,

I am still working around at the same problem, without any idea. Could
someone be so nice to point me out on any clue !?
I am trying to setup my lookAt as follow:

--
VirtualUniverse universeVU = new VirtualUniverse();
//etc etc
Transform3D T3D = new Transform3D();
translate.set( 0.0f, 0.0f, 0.0f);
T3D.setTranslation(translate);
//#1
cameraTG.setTransform(T3D);

T3D.lookAt(new Point3d(0.0,0.0,-3.0),
new Point3d(73.0,409.0,0.0 ),
new Vector3d(0.0,1.0,0.0 ));
T3D.invert();

//#2
cameraTG.setTransform(T3D);

KeyNavigatorBehavior keyNavBeh=new KeyNavigatorBehavior(cameraTG);
vpTrans.addChild(keyNavBeh);

cameraTG.addChild(viewPlatform);
// attach a BG with a 3D shape that follows my view
cameraTG.addChild(attachAvatar());

vpTrans.addChild(cameraTG);
vpRoot.addChild(vpTrans);
BranchGroup sceneRoot = createSceneGraph(mainCanvas);

locale.addBranchGraph(sceneRootBG);
locale.addBranchGraph(vpRootBG);
--
If I use only the #1 without the #2, my lookAt doesn't take any
effect but my view is right above the ground in the expected position. If I
use the #1 and #2, the lookAt takes effect but my camera looks as I have
done a double rotation on it: first 90'degrees in the Z followed by a
180'degrees in Y. Some hints !? I don't know if it is something related with
the identity matrix, e.g. in Opengl there is a glLoadIdentity method, that
you need to call before to use the lookAt method, but in Java3D I haven't
saw any related method.

Thnx in advance....§:0). Thomas

PS: Thx's Dave


_________________________________________________________________
Downloaden Sie MSN Explorer kostenlos unter http://explorer.msn.de/intl.asp

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

==========================================================================To 
unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to