2
$\begingroup$

It seems that now I upgraded to Blender 2.74 this Mouse Cursor script no longer works. I do not know Python but I think that there would be only little changes to be done. Thanks!

from bge import logic
controller = logic.getCurrentController()
own = controller.owner

mouse = controller.sensors['mouse']

hitPosition = mouse.hitPosition

own.worldPosition.x = hitPosition.x
own.worldPosition.y = hitPosition.y
$\endgroup$
  • $\begingroup$ What is the error in the "System Console"? And also what do you hope to achieve with this script? I run it with no problems. I used it on a cube with a mouse over sensor,and everytime I went the cursor over the cube, the cube changed position. $\endgroup$ – Lev May 31 '15 at 1:07
  • $\begingroup$ I am trying to get it so you can move a png as the cursor. I can't get it to move. $\endgroup$ – hehehehahha May 31 '15 at 1:21
1
$\begingroup$

Image This works for me. I changed it as little as possible. The red plane called "png" is the plane of your cursor. In the ground plane I put a mouse-over sensor called "mouse". I also activated true pulse trigger so that the script will run constantly when your cursor is over something.

$\endgroup$
  • $\begingroup$ It's still not working. I've also found another similar script but I have the same problem:the mouse looks frozen in play mode. Does anyone have any tips or hints about this issue? $\endgroup$ – Miracles Happen Jan 7 '17 at 4:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.