PathEngine home previous: iTestBed::loadSplashImage()next: iTestBed::lookAtWithPrecision()
Contents, API Reference, Interfaces, iTestBed, lookAt



Points the camera at a target. Can be used for a chase camera.


void lookAt(const cPosition& target, float angle, float elevation, float distance);


target The position to look at.
angle Orientation of the camera in the horizontal plane.
This angle is in radians, zero puts the camera along the positive y axis and increasing values rotate the camera clockwise around the target.
elevation Elevation of the camera.
This angle is in radians, zero puts the camera horizontal, increasing values raise the camera decreasing values lower the camera.
distance Distance of the camera from the target.


Calling this method on a given frame inhibits the built in testbed camera controls for that frame.
For chase camera, then, call this method every frame to avoid conflicting camera controls.

Documentation for PathEngine release 6.03 - Copyright © 2002-2021 PathEnginenext: iTestBed::lookAtWithPrecision()