AggrorJorn Posted October 10, 2010 Share Posted October 10, 2010 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 Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted October 10, 2010 Author Share Posted October 10, 2010 nvm, this part pivotRotation = Vec3(0) --setting pitch minimum and maximum pivotRotation.x = math.min(pivotRotation.x, 40) pivotRotation.x = math.max(pivotRotation.x, -60) had to be inside the loop. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.