Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bge
- cont = bge.logic.getCurrentController()
- owner = cont.owner
- mouse = cont.sensors["movement"]
- width = bge.render.getWindowWidth()
- width = width/2
- height = bge.render.getWindowHeight()
- height = height/2
- pos = mouse.position
- posX = width-pos[0]
- posX = posX*0.03*-1
- owner.localPosition.x = posX
- posZ = height-pos[1]
- posZ = posZ*0.03
- owner.localPosition.z = posZ
- print(posX)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement