I have set the minimum and maximum values for a rotation vector. However it is being ignored by the the program. Perhaps it is something really obvious:
part of the code
pivotRotation = Vec3(0)
--setting pitch minimum and maximum
pivotRotation.x = math.min(pivotRotation.x, 40)
pivotRotation.x = math.max(pivotRotation.x, -60)
while loop
UpdateAppTime()
--angle control
if KeyDown(KEY_W)==1 then
pivotRotation.x = pivotRotation.x + (0.2 / AppSpeed())
object:SetRotation(pivotRotation,1)
elseif KeyDown(KEY_S)==1 then
pivotRotation.x = pivotRotation.x - (0.2 / AppSpeed())
object:SetRotation(pivotRotation,1)
end