Creating a custom cursor

hello all,
i was wondering if theres any script available with the following context:
i want to move the mouse to wherever position and then the camera to look to the position where i moved the mouse(already achieved that with a mouseLook script but…) but i also want to see a mouse cursor to the same position as my camera is looking at!
is there any py script available for such a challenge?
thanks in advance,
PS: guess i need to learn python asap lol and i better get some scripts i have here to be read soon too ^^

simple you want a something like crosshair?! add the overlay screen with the dot or something else in the center of the screen… and set it as overlay to your current scene.,…

are u sure that it doesnt need any sensor/controller/actuator or something like that in order to the mouse caputure the mouse movement?
i think i have already tried to the it as a overlay but without a python script im not sure that it will work …but ill give it a shot and then post it back here if that worked !
Thanks for the feedback and cya next time…

Here is a tutorial:

Might need some updating though.

Hi Moguri ,
yeah ive been in this address for the first time like 4 hours ago :d thanks for the feedback too,but fortunately i found the solution for that issue which was leading the custom mouse cursor to the center of the character while moving the camera around(msmove)…so what i had to do was the following:
i actually didnt do much other than removing part of the mouselook code andt thats it :smiley:

oka for the custom cursor i added a mousecursor scene and the after creating the ustom cursor i added a py script which looks like this :
cont = GameLogic.getCurrentController()
own = cont.getOwner()
mPosi = cont.getSensor(“MousePosi”)
cursorPosi = mPosi.getRaySource()

ok so by adding the above and adding a mouse over any sensor the cursor starts moving according to ur mouse movement…ok till then no prob…
so obviously in the main scene i added the mousecursor scene overlay but i still had to mouselook center cursor position isssue ,so what i did is to remove these lines :

Removed code lines

get cursor position

pos = mouse.position

if cursor needs to be centered

if pos != [ width/2, height/2]:

Center mouse in game window

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

already centered. Turn off actuators


Get the actuators

act_LeftRight = controller.actuators[“LeftRight”]
act_UpDown = controller.actuators[“UpDown”]

turn off the actuators


after that ,bannngg bullseye hehe i had it working exactly the way i wanted it to be :smiley:

so now hopefully someone will read my bones action post and get me some more feedbck and i know i ask too much but thats part of the game u know ? :smiley:
Thanks a lot guys i really appreciate every little help here!
All the best,