All pastes #17382 Raw Edit

c_dd2

public cpp v1 · immutable
#17382 ·published 2005-07-10 17:34 UTC
rendered paste body
Quaternion orient = cameraNode->getOrientation();if (orient.getPitch() > yourLimit){    cameraNode->resetOrientation();    // Limit your pitch    cameraNode->pitch(yourLimit);    // Re-set yaw and roll (I think you can omit roll, since it's not used in quake style camera)    cameraNode->yaw(orient.getYaw());    cameraNode->roll(orient.getRoll());}