Community Forum

Mouse pointer issues

Forum Overview >> Farming Simulator 2009

CategoryFarming Simulator 2009
Created18.06.2009 00:40


Andreas Großschedl (Unknown) 18.06.2009 00:43
Is there a function to fix the Camera so that i can use the mousepointer. Now (when i use "setShowMouseCursor(true)" the mouse always jumps back to the middle of the screen.

thx

Stefan Geiger - GIANTS Software 18.06.2009 08:34
There is the function wrapMousePosition which moves the mouse cursor to the given position. This is called in the vehicle camera class, while you are entered in a vehicle.

Since you cant modify this behavior, there is an other way to change it.

Redefine the function wrapMousePosition whenever you want to have a free moveable mouse.

For example:

myOldWrapMousePosition = wrapMousePosition;

wrapMousePosition = function(x,y)
if not allowMouseMovement then
myOldWrapMousePosition(x,y)
end
end;


Now, whenever you want to allow to move the mouse, you can set allowMouseMovement = true
otherwise set allowMouseMovement = false.

Andreas Großschedl (Unknown) 18.06.2009 13:08
Thank you!

Andreas Großschedl (Unknown) 21.06.2009 00:25
I tried a lot but nothing changes...

Where do i have to place the code?

Thank you


Note: Log in to post. Create a new account here.