stable mouse move

i am trying to use the mouse move script to make a mouse controlled cursor move on the screen. however, there seems to be a correlation between the force/speed of the mouse move and that of the cursor such that if i mave the mouse from point A to point B the cursor will get further than B or not as far depending on the strength of the movement.
how do i negate this?

thanks in advance,
Sh


the script i am using (taken from the clasical mouseLook script):

######################################################

modified from MouseLook.py Blender 2.46

Tutorial for using MouseLook.py can be found at

www.tutorialsforblender3D.com

######################################################

import Rasterizer

import Rasterizer

get controller

controller = GameLogic.getCurrentController()

get the object this script is attached to

player = controller.getOwner()

Get sensor named Mouse

mouse = controller.getSensor(“Mouse2”)

Get the actuators

lookLeftRight = controller.getActuator(“LookLeftRight”)
lookUpDown = controller.getActuator(“LookUpDown”)

get width and height of game window

width = Rasterizer.getWindowWidth()
height = Rasterizer.getWindowHeight()

define mouse movement function

def mouseMove():

distance moved from screen center

x = width/2 - mouse.getXPosition()
y = height/2 - mouse.getYPosition()

intialize mouse so it doesn’t jerk first time

if hasattr(player, ‘mouseInit’) == False:
x = 0
y = 0
# bug in Add Property
# can’t use True. Have to use 1
player.mouseInit = 1

return mouse movement

return (x, y)

get mouse movement from function

move = mouseMove()

set mouse sensitivity

sensitivity = 0.009

Amount, direction and sensitivity

leftRight = move[0] * sensitivity
upDown = move[1] * sensitivity

set the values

lookLeftRight.setDLoc(0.0, leftRight, 0.0, False)
lookUpDown.setDLoc(0.0, 0.0, upDown, True)

Use them

GameLogic.addActiveActuator(lookLeftRight, True)
GameLogic.addActiveActuator(lookUpDown, True)

Center mouse in game window

Rasterizer.setMousePosition(width/2, height/2)

Thanks, but this didn’t solve the problem - also using this script i am getting diffrent mouse reactions by the strength/speed of the mouse movement. maybe this is somehow related to friction parameters?

just clarifying - the problem isn’t that the script is not “stable” - i think it does exactly what it they were both planned to do. it’s just that i need somthing a bit diffrent, which is stability and consistency in the actual motion (i.e. mouse at point X meens cursor at x’, mouse at point X+3 meens cursor at X’+3*M (with M a stable parameter and not a variable).

I don’t think that’s the case - if you move the mouse by a certain speed, the variables and cursor should follow the same lead. However, to tell you the truth, I’m having a little bit of a hard time understanding exactly what you want. You want the cursor to move at a slightly lesser or greater rate than the mouse using the M variable, right?