#1
|
|||
|
|||
VizTouch Help!
Hello!
First of all I would like to say thank you for a wonderful software. I have had hours of fun creating various virtual environments. I have just recently purchased a touch-screen and started exploring the VizTouch module and I have a little issue, maybe you can help! I have a cube that I want to look around using setEuler. I disabled the regular mouse navigation but I can't seem to figure out how to determine which way I want to rotate. In terms of touch I want this: Code:
def begin(e): #Begin touch def move(e): #On move, determine which direction it is moving and rotate the around the cube appropriately. As long as the touch persists, keep rotating slowly. def end(e): #End touch viztouch.onTouchDown(begin) viztouch.onTouchMove(move) viztouch.onTouchUp(end) Code:
def gesturemethod(typen): if (typen == 'left'): #cube.setEuler... elif (typen == 'right'): #cube.setEuler... elif (typen == 'up'): #cube.serEuler... elif (typen == 'down'): #cube.setEuler... viztouch.onGestureFlick(viztouch.FLICK_UP,gesturemethod, 'up') viztouch.onGestureFlick(viztouch.FLICK_DOWN,gesturemethod, 'down') viztouch.onGestureFlick(viztouch.FLICK_RIGHT,gesturemethod, 'right') viztouch.onGestureFlick(viztouch.FLICK_LEFT,gesturemethod, 'left') Thanks!! M12 |
|
|