This is my little Python programm Using Vpython I want to rotate a box. I want to use the boxes axis and not the one of the scene. so for example if its rotated to the right and then i want to get the "nose" down, i want to do this in the view of the box... imagine i was a jet ;) BTW: I´m a python 3
from visual import *
a=box(size=(5,1,3),axis=(1,0,0))
def tasten():
"Looooopings "
if scene.kb.keys: #action on keyboard?
druck=scene.kb.getkey() #save to cache
if druck=='left':
a.rotate(angle=-1/100, axis=(1,0,0)) #links drehen
if druck=='right':
a.rotate(angle=1/100, axis=(1,0,0)) #rechts drehen
if druck=='up':
a.rotate(angle=-1,axis=(0,0,1)) #nose down
while True:
tasten()