-------------------------------------------------------------------------------- -- Handler.......... : onTurnHead -- Author........... : -- Description...... : -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function FPVCamera.onTurnHead ( nPointX, nPointY, nDeltaX, nDeltaY ) -------------------------------------------------------------------------------- this.nDstAngleH ( this.nDstAngleH ( ) - 90 * nDeltaX ) this.nDstAngleV ( math.clamp ( this.nDstAngleV ( ) + 90 * nDeltaY, -85, 85 ) ) if ( nPointX < -0.75 or nPointX > 0.75 or nPointY < -0.75 or nPointY > 0.75 ) then this.centerMouse ( ) end -------------------------------------------------------------------------------- end --------------------------------------------------------------------------------