from direct.showbase.ShowBase import ShowBase
from panda3d.core import Vec3, Point3
class MyApp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
up = Vec3(0, 0, 1)
calc = Point3(0, 0, 0) - Point3(0, 0, 0)
calc.normalize()
print(calc.angle_deg(up))
app = MyApp()
app.run()
out:
60.000003814697266
Shouldn’t the angle be 90? Or how can I get around it, in other cases it works correctly. Of course, I can add a check for the zero value of the vector and not make calculations. It would be nice if warnings about this behavior were noted somewhere in the manual.