Although this method is briefly described, I thought I’d go into a little more detail to help the noobs (like me) figure this stuff out.
Sorry it’s so long winded, but I hope it helps.
In the Blender Game Engine, a “property” is something you can use to count numbers, store data, etc. In this case, we’ll be counting numbers. The thing that confused me at first was that I expected the property to be something that already existed in the game engine (like RotX, if I were doing stuff with a python script, for example) – it isn’t that way. Just remember that the property you set up is its own thing, separate from the object properties in Blender (there’s probably a way to change this with a python script or something, but I don’t know how).
So to get this rotation boundary thing to work, you need to add some numbers to your property. This is done with a property actuator. You also want to give the property some upper and lower bounds – this can be done with a sensor set to “interval.” Now the nice thing about the AND controllers is that you can wire up more than one thing on either side of it. So in my case, I wired a keyboard key (Sensor) and property interval (sensor) to an AND (controller) and that gets wired to a motion (actuator) that makes the thing move and a property (actuator) that adds numbers to my property.
So, in the game every pulse from the keyboard key moves the object 10º AND every pulse also adds 0.1 to my property. A property value greater than or equal to 1.8causes the “AND” statement to be false, thus the keyboard control stops working in that direction. (The opposite is wired for the opposite direction.)
You “visual learners” should have a look at this:
You might need to tweak the max and min values in the interval to deal with rounding errors. Selecting the “D” next to your property (on the left) displays debug info (shows you what the numbers are in real time while you’re testing your game) and is very helpful.
Let me know if you have any questions. Good luck with your projects!