Thread: Mouse problem
View Single Post
  #2  
Old 06-16-2005, 11:36 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi Steve,

1) When the MOUSEMOVE callback returns relative data then it will automatically recenter the mouse when it reaches the edge of the window. If you don't want the mouse to be recentered, then you can change the callback so that it returns absolute data. By default, the horizontal data is absolute and the vertical data is relative. To change both to absolute do the following:
Code:
viz.mousedata(viz.ABSOLUTE,viz.ABSOLUTE)
2)I believe this is happening because you are turning off mouse movement while the viewpoint is moving. After you turn off mouse movement issue the following command to stop any current movement:
Code:
viz.velocity(0,0,0)
3) To check if "Shift + Ctrl" is pressed you can use the viz.iskeydown function. Example:
Code:
if whichKey == viz.KEY_CONTROL_L and viz.iskeydown(viz.KEY_SHIFT_L):
    print 'Shift + Ctrl pressed'
This will get triggered when the user presses CTRL while the SHIFT key is down. It won't work if the user presses SHIFT while the CTRL key is down. To do that you would have to swap the key values in the above sample code.

Let me know if you need any more help on this.
Reply With Quote