Fixed? bounding box computation error

This commit is contained in:
Mark Mine 2002-05-14 21:49:01 +00:00
parent 2fc1dfb8a3
commit 24b2cc8203
2 changed files with 3 additions and 2 deletions

View File

@ -292,7 +292,7 @@ class DirectCameraControl(PandaObject):
self.cqEntries = self.cqEntries[1:] + self.cqEntries[:1] self.cqEntries = self.cqEntries[1:] + self.cqEntries[:1]
# Filter out object's under camera # Filter out object's under camera
node = entry.getIntoNode() node = entry.getIntoNode()
nodePath = render.findPathDownTo(node) nodePath = render.findPathTo(node)
if direct.camera not in nodePath.getAncestry(): if direct.camera not in nodePath.getAncestry():
# Compute hit point # Compute hit point
# KEH: use current display region ray # KEH: use current display region ray

View File

@ -235,7 +235,8 @@ class DirectBoundingBox:
self.lines = self.createBBoxLines() self.lines = self.createBBoxLines()
def computeBounds(self): def computeBounds(self):
self.bounds = self.nodePath.getBounds() #self.bounds = self.nodePath.getBounds()
self.bounds = self.getBounds()
if self.bounds.isEmpty() or self.bounds.isInfinite(): if self.bounds.isEmpty() or self.bounds.isInfinite():
self.center = Point3(0) self.center = Point3(0)
self.radius = 1.0 self.radius = 1.0