Hi everyone - got a couple of questions.
how do i load LQuaternionf without importing all of pandac.PandaModules?
how do i create an LQuaternionf?
I tried to import LQuaternionf last night using the following python code:
from pandac.PandaModules import LQuaternionf, LVector3f
and it doesn’t work. ppython can’t find LQuaternionf in the PandaModules namespace.
but when I do
from pandac.PandaModules import *
so that’s question 1
i’m trying to get a quaternion for obj and do some rotational work obj’s positioning (offset is the quaternion i’m using to figure out the rotation).
objqua = self.obj.getQuat() #offset = LQuaternionf() -> ppython complained about this *a lot* offset = LRotationf() #ppython does not complain offset.setFromAxisAngle(2*elapsed,LVector3f.unitY())
in any case, ppython complains when it gets to LRotationf() (which i guess is a wrapper for LQuaternionf? ppython complained about LQuaternionf so I changed over to LRotationf and that seemed to work ok).
So the second question is really a 2 part-er.
the first part being why can’t i import LQuaternionf but I can use LRotationf?
the second part being ok cool i can make an LQuaternionf or a LRotationf - how to do create an object with that type?