How to look at the front of
3D Model in
I am confused to set X Y Z for LookDirection.
I don't know what happens when I set xyz and I don't know where camera is looking at. I don't know the same thing for
Below is my camera properties:
camera.Position = new Point3D(100, 100, 150);
camera.LookDirection = new Vector3D(-100, -100, -100);
camera.UpDirection = new Vector3D(0, 0, 1);
The problem is that camera is looking from behind. Model is shown like cube below.
How to make it look front face?
Also please explain how to set xyz. i know what properties do but i cant imagine them.
I think X is from right to left.Y is depth. Z is up to down .
Best How To :
Imagine, instead of a camera, you're moving your head around in 3D space. then
Camera.Position is specifying where your head is located,
Camera.LookDirection determines the direction you're looking at and
Camera.UpDirection shows the orientation of your head. the following pictures clear things up for you.
In the first Image, Camera is centered on the +Z axis looking down to -Z axis and to your shape:
When you set
camera.Position to for example (x=1, y=0, z=10) then camera position changes like this:
as a result, camera moves a little to the right and therefore you will see your shape at the left side of the view.
camera.LookDirection gets changed to say (x=0, y=1, z=-1), then camera simply looks at the point (0,1,-1) like this:
camera.UpDirection determines where the top of your camera points at. In the following picture, setting
camera.UpDirection to (-0.5,1,0) results in rotation of the camera counter clockwise:
I hope these pictures clear things up for you.