base.camera should be a ModelNode

This commit is contained in:
David Rose 2009-04-20 15:15:11 +00:00
parent f486d3c152
commit a6cd326db6

View File

@ -1043,7 +1043,11 @@ class ShowBase(DirectObject.DirectObject):
# self.camera is the parent node of all cameras: a node that
# we can move around to move all cameras as a group.
if self.camera == None:
self.camera = self.render.attachNewNode('camera')
# We make it a ModelNode with the PTLocal flag, so that
# a wayward flatten operations won't attempt to mangle the
# camera.
self.camera = self.render.attachNewNode(ModelNode('camera'))
self.camera.node().setPreserveTransform(ModelNode.PTLocal)
__builtin__.camera = self.camera
if useCamera: