Hi,
I'm trying to figure out if there is a problem with the camera class and the SetView method in particular. In order to render an object we need the position and the orientation of the camera but if the camera is following a target its position and orientation are determined by the target object. Moreover we need the position of the target in world space. If we set some child node as a camera target how can we even render the parent??? In order to render the parent we will need the position and orientation of the camera and those are determined by the target, which happens to be the child in this situation.
How do we know the global position of the child before it has even been rendered? Don't we need the matrix stack to determine the child's global position and orientation?
Thanks in advance.
I'm trying to figure out if there is a problem with the camera class and the SetView method in particular. In order to render an object we need the position and the orientation of the camera but if the camera is following a target its position and orientation are determined by the target object. Moreover we need the position of the target in world space. If we set some child node as a camera target how can we even render the parent??? In order to render the parent we will need the position and orientation of the camera and those are determined by the target, which happens to be the child in this situation.
How do we know the global position of the child before it has even been rendered? Don't we need the matrix stack to determine the child's global position and orientation?
Thanks in advance.