
Blender Tutorial - Custom Mouse
Here is the script:
import Rasterizer as r
g = GameLogic
c = g.getCurrentController()
o = c.getOwner()
mMove = c.getSensor(”Move”)
width = float(r.getWindowWidth())
height = float(r.getWindowHeight())
aspecty = height/12.0
aspectx = width/16.0
o.MouseX = (mMove.getXPosition()-width/2)/aspectx
o.MouseY = -(mMove.getYPosition()-height/2)/aspecty
o.setPosition([o.MouseX + 0.2,o.MouseY - 0.3,0])
