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$
2
  • $\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, 2015 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$ May 31, 2015 at 1:21

1 Answer 1

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$
1
  • $\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$ Jan 7, 2017 at 4:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .