Advertisement
Guest User

Untitled

a guest
Apr 11th, 2015
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. WindowPos = viz.window.getPosition()
  2.     WindowSize = viz.window.getSize()
  3.    
  4.     Center = [WindowPos[0] + WindowSize[0]/2, WindowPos[1] + WindowSize[1]/2]
  5.  
  6.     deltaMouse = [ MOUSE_SENSATIVITY * (win32api.GetCursorPos()[0] - Center[0]), MOUSE_SENSATIVITY * (win32api.GetCursorPos()[1] - Center[1]) ]
  7.    
  8.     navigationNode.setEuler(yaw + deltaMouse[0], pitch + deltaMouse[1], 0)
  9.    
  10.     win32api.SetCursorPos(Center)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement