Someone has to say it, and I apologise in advance as this will probably come across as overly critical, sorry I'm not very politically correct (we don't know your age / education / whether English is your first language / whether you have learning difficulties) : a lot of the confusion we are having is because a lot of your sentences don't make grammatical sense in English.
I have spent a bit of time trying to work out the meaning behind them...
Quote
I want the camera to be kept within a certain area in 3D space so that when its it can't infinity move out of view of the target object.
This sentence doesn't parse in English.
Quote
In terms of yaw and pitch it is possible to yaw and pitch out of sight of the target. This isn't much of an issue. My goal is to keep the camera bounded within a certain area for pitch, roll and yaw.
This also makes no sense. Camera (location?) bounds have nothing to do with pitch, roll and yaw, which are rotations. I'm guessing what you are trying to say would be this (but I can't be sure):
In terms of camera yaw and pitch it is possible to move the viewpoint so that the target is no longer in view. This isn't much of an issue. My goal is to keep a certain area in view of the camera, rather than a particular target.
However this seems to conflict with what you are asking here:
Quote
The camera is being used to rotate, pan and zoom in/around an object. At the moment I can move out of sight of the object. Is there a way to block the camera from going out of sight of the object?
Is the object doing the seeing, or the camera? Cameras are used to provide a viewpoint for rendering, so if anything sees, it is the camera, and not the object being viewed (unless of course you are talking about an AI object that does actually see?).
Quote
In a nutshell I want the camera to be bounded within a specific area of the scene. This would be in 3D not 2D.
This parses but it is ambiguous, you want the camera location to be bounded or the view seen from the camera?
Programming in general, and the description of algorithms requires you to be very specific in your language. In natural language we get away with a certain amount of ambiguity, as the meaning can often be inferred from the context. But here when you use the word 'camera' you should specify what property of the camera you are referring to.
Also another part of the problem is perhaps unfamiliarity with the terms involved in 3D. This is understandable.
At a very basic level objects in 3D have a:
-
Location
-
Rotation (sometimes referred to as orientation) - this is often managed as either a Quaternion, Axis Angle, or Euler angles (yaw, pitch roll)
A camera has a location and a rotation, and in addition extra properties such as field of view and aspect ratio. All of these interact to determine what is seen by the camera, the view. So when you refer to a camera or object, you should be specific about which properties you are referring to. If you are unsure of a term, it usually only takes a quick search on wikipedia or similar.
In addition to keeping your sentences simple and specific, drawing diagrams may be useful as these are often helpful to convey ideas in 3D. Asking questions and conveying concepts about 3d graphics is not an easy thing to do, even for those who are very familiar with the subject, so please do not take this too harshly, more as practical advice.
As it is, you seem to be asking how to keep an object in view of the camera, but you don't mind if the object leaves the view of the camera.