![]() |
|
|||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#4
|
|||
|
|||
|
Maybe something along the lines of:
Code:
diffInZ = 3.0 # Value to add/subtract to Z position of selected ball
def onMouseWheel(dir):
global ball # Same ball object selected from previous mouse move callback
# Check 'ball' is valid/one selected from previous callback
ballPos = ball.getPosition()
addZ = -3.0
# If wheel is moving forward, make positive, else leave as negative
if dir > 0:
addZ = 3.0
ball.setPosition( ballPos[0], ballPos[1], ballPos[2] + addZ )
viz.callback(viz.MOUSEWHEEL_EVENT,onMouseWheel)
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how can I stop an action? | nlfrnassimi | Vizard | 4 | 02-13-2009 12:59 AM |
| Pick porblem with arrays | shivanangel | Vizard | 3 | 08-27-2007 10:10 AM |
| Moving view with object | Xliben | Vizard | 2 | 07-25-2005 05:36 PM |