snoopy78
07-20-2009, 01:20 AM
Hi,
I want to push a button with my mouse and afterthat my object should rotate for a special amount.
This works, but I had to push the button again and again.
def onButton(obj,state):
if obj == scene3.btnLeftRotate1:
if state == viz.DOWN:
object1.rotate(-1,0,0,'',viz.RELATIVE_LOCAL)
viz.callback(viz.BUTTON_EVENT,onButton)
I want to push the button one-time with my mouse and as long as I hold the button pressed, the object should move on and on.
I want to push a button with my mouse and afterthat my object should rotate for a special amount.
This works, but I had to push the button again and again.
def onButton(obj,state):
if obj == scene3.btnLeftRotate1:
if state == viz.DOWN:
object1.rotate(-1,0,0,'',viz.RELATIVE_LOCAL)
viz.callback(viz.BUTTON_EVENT,onButton)
I want to push the button one-time with my mouse and as long as I hold the button pressed, the object should move on and on.