Browse Source

add center parameter

David Rose 19 years ago
parent
commit
390f5cbada
1 changed files with 3 additions and 1 deletions
  1. 3 1
      direct/src/actor/Actor.py

+ 3 - 1
direct/src/actor/Actor.py

@@ -512,7 +512,7 @@ class Actor(DirectObject, NodePath):
 ##             self.__LODNode.node().setSwitch(index, self.switches[eachLod][0],
 ##                                      self.switches[eachLod][1])
 
-    def addLOD(self, lodName, inDist=0, outDist=0):
+    def addLOD(self, lodName, inDist=0, outDist=0, center=None):
         """addLOD(self, string)
         Add a named node under the LODNode to parent all geometry
         of a specific LOD under.
@@ -522,6 +522,8 @@ class Actor(DirectObject, NodePath):
         self.switches[lodName] = [inDist, outDist]
         # add the switch distance info
         self.__LODNode.node().addSwitch(inDist, outDist)
+        if center != None:
+            self.__LODNode.node().setCenter(center)
 
     def setLOD(self, lodName, inDist=0, outDist=0):
         """setLOD(self, string)