kottore / away3d

Automatically exported from code.google.com/p/away3d
0 stars 0 forks source link

[Broomstick] PrimitiveBase.updateBounds() #170

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
var cont:ObjectContainer3D = new ObjectContainer3D();
cont.addChild(new Cube());
trace(cont.maxX); // Error

TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
    at away3d.bounds::BoundingVolumeBase/fromGeometry()
    at away3d.entities::Mesh/updateBounds()
    at away3d.entities::Entity/get maxX()
    at away3d.containers::ObjectContainer3D/get maxX()

in PrimitiveBase must be updateBounds method like this

override protected function updateBounds() : void
{
    if (_geomDirty) updateGeometry();
    super.updateBounds();
}

Original issue reported on code.google.com by System.g...@gmail.com on 10 Apr 2011 at 12:36