setting the view
843799Dec 14 2001 — edited Dec 15 2001I am using the SimpleUniverse and want to set the view to (0, 2, 2) such that the "eye position" is 2meters up the Y axis and 2 meters up the z axis. However, no matter what values I put in the vector, only the Z axis seems to be changed. Thus, I seem to only be able to move closer or farther away from the origin. Here is my code snipet:
mainScene = createSceneGraph();
u = new SimpleUniverse(c);
ViewingPlatform viewingPlatform = u.getViewingPlatform();
TransformGroup vpTrans = viewingPlatform.getViewPlatformTransform();
Transform3D transform = new Transform3D();
Vector3f translate = new Vector3f(0.0f, 2.0f, 2.0f);
transform.setTranslation(translate);
vpTrans.setTransform(transform);
The object I am viewing is a room, and right now my "eye level" is on the floor. Can anyone tell me what I am doing wrong?