I tried to do this :

Code: Select all

```
void Pawn::commandPitch(const Radian& angle)
{
mNextPitch = angle;
//Do not allow to reverse camera
//temp is the final node's pitch after making a pitch(mNextPitch)
Radian temp = mOgreNode->getWorldOrientation().getPitch() + mNextPitch;
// Will the result be out of limits ?
if(temp > mMaxPitch || temp < mMinPitch)
{
// Yeah, so substract exceedent to the command
if(mNextPitch > Degree(0))
mNextPitch -= temp - mMaxPitch;
else
mNextPitch += temp - mMinPitch;
}
// Now we can safely call cameraNode->pitch(mNextPitch)
}
```

What should I use to have correct values, or who do I use values returned by getPitch if they're right ?

Thanks