frame.rotate flips 180 degrees
Closed this issue · 0 comments
BruceSherwood commented
Reported by Geoff Tovey, bug in setting frame.axis (display flips in some orientations):
from visual import *
f = frame()
box() # marks frame origin (centre of rotation)
c = curve(frame=f, pos=[(0,0,0),(8,0,0),
(8,0,4),(8,2,4)], color=color.cyan)
while True:
for angle in range(0,360):
rate(100)
angleR = radians(angle)
f.axis = ( cos(angleR), sin(angleR), 0) # this fails
f.rotate(angle=radians(1), axis=(0,0,1)) # this works
if f.frame_to_world( (0,0,10)).z < 0:
c.color = color.red
else:
c.color = color.cyan