Reset Mouselook rotation counter?

I have an object which rotates using the Mouselook actuator, it has rotation limits set (-90 and 90), and I assume that there’s a variable value somewhere which stores how much the mouse has moved on the axis so that it knows when to stop allowing it to rotate, my question is how would I access that value with python and reset it, because when I rotate the object, the limit is in place, however if I reset the rotation of the object with python (obj.localOrientation), the object’s rotation is reset, but the place where the limit is changes.

The object in question is an empty, represented by the lower plane in the camera view(you should see two planes perpendicular to the camera, near the top of the view), which you can see is reset as it returns to it’s original position, however rotation caps do not seem to be reset upon resetting local orientation.

Same problem here. I wonder if this is a bug or if there is a good explanation for this.

@TimDrew: Did you solve it already?

EDIT: You can reset the mouselook rotation via python, have a look at this: http://bgepython.tutorialsforblender3d.com/MouseActuator/Look/reset

I use python

rot = baseObject.worldOrientation.to_euler()
rot.x+=own[‘MouseX’]
childObject.worldOrientation =rot

I build my offset each frame
(distance mouse moved from center of screen) and move the mouse to the center of the screen each frame.

@Momel, Thanks for the reply. This resets rotation of the actuator, it does not seem to reset the limit counter.

Unfortunately, I can’t play the video from your google drive link. I don’t know why, but I get a message that an error has occured.

So I might have misunderstood you. I thought that your problem is that when you reset the rotation of your object, the limit doesn’t get reset too and rotates with the object so that it is wrong afterwards. In this case, reset() has helped me because the limit stays where it was, only the object rotation changes. obj.localOrientation not, it seems to rotate the limit with the object.

I’m not a native english speaker, so I hope you can understand what I mean :slight_smile:

EDIT: I forgot that it is possible to download the video from google drive^^. So I did this and now I can see your problem. I think this gets solved when you use reset() because I had almost the same problem (but in my case I wanted to reset the camera rotation when switching perspectives). So what exactly happens when you use reset()?