MouseLook movement!

Hello everyone!
Is there anyway i can have a property that displays the rotation(left /right) of the mouselook?
Like,i need to know if i am moving the mouse to left or to right!
I really need a way to achieve this!

Any help would be greatly appreciated!

hmm,I guess its not possible…

I’m sure there are a few ways to do this but here is how I do it. I set this up to rotate the camera on right-mouse click so your needs will probably be a little different. Also there is probably a better way to do this but this works for me.
I have a mouse movement sensor that assigns the xpos of the cursor to a property (if NO right-click). On right-click and move I compare the new xpos to the stored property. If the xpos is greater than the property I rotate left, if less I rotate right.

Here’s some sample code:

move = cont.actuators["Move"]
mm = own.sensors["MouseMove"]
Xpos = mm.position[0]

if rclick.positive and mm.positive:
    if Xpos > own["CursorX"]:
        cont.activate(move)
        move.dRot = (0.0, 0.0, -.4)
    else:
        cont.activate(move)
        move.dRot = (0.0, 0.0, .4)
else:
    cont.deactivate(move)
    own["CursorX"] = Xpos

Refine the question a little!

Ok,so I want to make a object know if I am moving the mouse at left or at right, the best way it can be done is by using a property that should display if I am going with the mouse on the left side or the right side.

very easy

select the camera , add 2 property (float) to the brick property ,call it , x and y
x = 0.0
y = 0.0

then adding this script

import bge

own = bge.logic.getCurrentController().owner
own[“x”] = bge.logic.mouse.position[0]
own[“y”] = bge.logic.mouse.position[1]

this display the original value of mouse position in the screen

PS: with an always sensor true pulse …of course!

Thank you very much Marco!!