camera direction


Is it possible to set the direction of the camera. Is there a function like

thank you might be what you are looking for

I have configured some camera functions just yesterday, use: -> cords you are looking -> cords the camera is

Take a look at the Roaming Ralph example, it will probably help.

thanks both of you for the replies.

My issue here is that I am moving the camera based on a motion path. While the camera is moving, the user is able to rotate the camera by changing the heading and pitch values and with the method self.heading, self.pitch, 0 )

The default direction of the camera should be according to the direction of the motion path(working with lookat()) and the user should be able to rotate the camera manually(working with setHpr()).

The problem here is that I can’t use both method. Either the camera must be rotated with setHpr or set its direction with lookAt. I can’t join the two methods.

Can anyone suggest something different?

what i would do in this case is create a node that follows the path, and make the camera follow the node lookingAt it each and every frame.
by ‘following’ i mean to interpolate the camera to the position of the path relative to a certain distance of the node
when the user ‘rotates’ i would alter the ‘following’ displaced position of the cam to a point left/right of the path point itself.