Setting visible = false on an Array of cubes

Software: Away3D 3.x

lostirc, Newbie
Posted: 11 August 2011 02:36 PM   Total Posts: 5

I’m currently working with a method that is used to toggle the visibility state on an Array of Cube primitives.

The method is really simple and does work, though with one issue.

private function toggleBoxVis(aArray:Array, aBool:Boolean):void{
   
for(var i:int aArray.length i++){
    aArray[i]
.visible aBool;
   
}
  
  } 

When I toggle the visibility state to true my cubes show up but….
When I toggle to false the cubes do not disappear until I update the transform matrix of the ObjectContainer3D that the cubes are contained in.

Is there some kind of force update method I could run on my ObjectContainer3D, I assume this issue is coming from away3d not updating the objectcontainer.

My render method is in a frame loop and manually calling view.render doesn’t fix the problem

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X