Object to cursor

Ive achieved this in the past numerous times but cant seem to get it up tonight :wink:
anyway heres my code

import bge
G = bge.logic
cont = G.getCurrentController()
owner = cont.owner
mouse = cont.sensors["movement"]
owner.position = mouse.raySource

Object has no attribute raySource? is there a way I can force this attribute? is raySource even relevent anymore?

===============EDIT======================

Okie diddly solved that shiznit

import bgefrom bge import render
render.showMouse(0)


cont = bge.logic.getCurrentController()
scene = bge.logic.getCurrentScene()
own = cont.owner


mouse = cont.sensors["mouseOverAny"]


if mouse.positive:
    own.worldPosition = mouse.hitPosition

Its probably easier/better to just connect an always sensor to a mouse actuator so you only remove the mouse cursor once, instead of every single frame.

Good point!