lookAt error

self.nd1.lookAt(self.nd2, Vec3(0, 0, 1))

I want to specify the up vector but the returns error:

TypeError: Arguments must match one of:
lookAt(non-const NodePath this, const Point3 point)
lookAt(non-const NodePath this, const NodePath other)
lookAt(non-const NodePath this, const Point3 point, const Vec3 up)
lookAt(non-const NodePath this, const NodePath other, const Point3 point)
lookAt(non-const NodePath this, const NodePath other, const Point3 point, const Vec3 up)
lookAt(non-const NodePath this, float x, float y, float z)
lookAt(non-const NodePath this, const NodePath other, float x, float y, float z)

Everything works fine without the up vector (tested in different ways). What’s wrong?

It looks like you want to try using one of these:

lookAt(non-const NodePath this, const Point3 point, const Vec3 up)
lookAt(non-const NodePath this, const NodePath other, const Point3 point, const Vec3 up) 

Which means you probably want to do this:

self.nd1.lookAt(self.nd2.getPos(), Vec3(0, 0, 1))

Or maybe this:

self.nd1.lookAt(self.nd2, Point3(0, 0, 0), Vec3(0, 0, 1))

David

Thanks!