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.
Code:
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.