Mopath updates to enable loading of old player curves:wq
This commit is contained in:
parent
1575910f01
commit
aa23723b37
|
|
@ -254,12 +254,12 @@ class DirectCameraControl(PandaObject):
|
|||
t.coaCenter = getScreenXY(self.coaMarker)
|
||||
t.lastAngle = getCrankAngle(t.coaCenter)
|
||||
# Get a copy of the camera/manipRef offset matrix
|
||||
t.wrtMat = Mat4()
|
||||
t.wrtMat.assign(direct.camera.getMat( self.camManipRef ))
|
||||
t.wrtMat = Mat4(direct.camera.getMat( self.camManipRef ))
|
||||
taskMgr.add(t, 'manipulateCamera')
|
||||
|
||||
def mouseRollTask(self, state):
|
||||
wrtMat = state.wrtMat
|
||||
print wrtMat
|
||||
angle = getCrankAngle(state.coaCenter)
|
||||
deltaAngle = angle - state.lastAngle
|
||||
state.lastAngle = angle
|
||||
|
|
|
|||
|
|
@ -20,8 +20,9 @@ class Mopath(PandaObject):
|
|||
def getMaxT(self):
|
||||
return self.maxT
|
||||
|
||||
def loadFile(self, filename):
|
||||
self.reset()
|
||||
def loadFile(self, filename, fReset = 1):
|
||||
if fReset:
|
||||
self.reset()
|
||||
nodePath = loader.loadModel(filename)
|
||||
if nodePath:
|
||||
self.__extractCurves(nodePath)
|
||||
|
|
|
|||
Loading…
Reference in New Issue