get camera() to point to the front of a flat object
in
Programming Questions
•
2 years ago
hello,
i'm trying to interpolate a camera from one image to another in a 3D space where there is a circle of images facing one another around the y-axis. the following excerpt allows me to transition to each image in the circle but they are all seen from the same side. how do i point the camera at the front of an image? something to do with normalization?
camTargetX = currentCameraobj.getX();
camTargetY = currentCameraobj.getY();
camTargetZ = currentCameraobj.getZ();
camCurrentX = camCurrentX + (camTargetX - camCurrentX)/ 30;
camCurrentY = camCurrentY + (camTargetY - camCurrentY)/ 30;
camCurrentZ = camCurrentZ + (camTargetZ - camCurrentZ)/ 30;
pa.camera(camCurrentX, camCurrentY, camCurrentZ, camCurrentX, camCurrentY, camCurrentZ, 0.0f, 1.0f, 0.0f);
any help would be appreciated.
i'm trying to interpolate a camera from one image to another in a 3D space where there is a circle of images facing one another around the y-axis. the following excerpt allows me to transition to each image in the circle but they are all seen from the same side. how do i point the camera at the front of an image? something to do with normalization?
camTargetX = currentCameraobj.getX();
camTargetY = currentCameraobj.getY();
camTargetZ = currentCameraobj.getZ();
camCurrentX = camCurrentX + (camTargetX - camCurrentX)/ 30;
camCurrentY = camCurrentY + (camTargetY - camCurrentY)/ 30;
camCurrentZ = camCurrentZ + (camTargetZ - camCurrentZ)/ 30;
pa.camera(camCurrentX, camCurrentY, camCurrentZ, camCurrentX, camCurrentY, camCurrentZ, 0.0f, 1.0f, 0.0f);
any help would be appreciated.
1