I have a object that I want to get the current rotation of, but I cannot seem to find any information on how to do this. The only way I could think of was to add a variable onto the object and change it exactly how much I rotate the object.
test.rotate(test.rotational_velocity * dt, vec(0, 0, 1))
test.angle += test.rotational_velocity * dt
Is there any better method to get the current rotation of an object in VPython?
From the documentation on vectors at glowscript.org (click "Help"):
diff_angle(A,B) = A.diff_angle(B), the angle between two vectors, in radians
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.