I see a few problems in your code. The first one is the
if statement, because it will always be false, no matter how you rotate your camera. Your camera angle can not be smaller than 90, and at the same time be larger than 270.
So naturally, the only code being executed is the code between the
else and
endif.
So, delete everything except for that, so you have the following code:
yrotate camera wrapvalue(camera angle y()-mousemovex())
xrotate camera wrapvalue(camera angle x()+mousemovey())
Changing polarity on the y axis is easy, you just change the
-mousemovex() to a
+mousemovex()
yrotate camera wrapvalue(camera angle y()+mousemovex())
xrotate camera wrapvalue(camera angle x()+mousemovey())
Now to make sure the camera doesn't go over 90 and 270, add this at the end:
if camera angle x()<90 then xrotate camera 90
if camera angle x()>270 then xrotate camera 270
So the full code will look like this:
yrotate camera wrapvalue(camera angle y()+mousemovex())
xrotate camera wrapvalue(camera angle x()+mousemovey())
if camera angle x()<90 then xrotate camera 90
if camera angle x()>270 then xrotate camera 270
Enjoy!
TheComet
Make the paths of your enemies easier with WaypointPro!