Camera rig example in engine

A new example showing how to use the class PCamRig object is available in the engine’s samples.

PCamRig is using PRange objects to describe all rotations (pitch, yaw & roll), enabling a simple control of the angles.

In the example, roll is going from 0° to 90° and yaw from -45° to 45°, the mouse is only controlling the percentage of each range applied on the camera. There is a subtlety about axis of rotation explained in the code.

It comes with a simple way to interpolate value with an “elastic” effect. Explanation about the interpolation can be found here: Notes:Interpolation, speed/current

4 Comments

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.