Hey Tony this is strange - why do you need to do this? Away3D Lite culls object behind the camera in normal operation - are you using some funky camera settings? Would be interested to find out...
Rob On Sun, Nov 8, 2009 at 6:29 PM, mogg <[email protected]> wrote: > First I want to thank the Away3Dlite team for the "obj3d.screenZ" > property. This makes this possible. > > I have been having issues with strange renderings that happen when an > object is around, on, or just behind the camera. To turn off objects > behind the camera I'm using the "screenZ" property of every object > like so: > > //loop through all top level objects in the scene. > for each(var obj3:Object3D in view.scene.children) > { > if(obj3.layer != null) > { > if(obj3.screenZ < 200) > { > //trace("Not Visible:"+obj3.name+" "+obj3.screenZ); > obj3.visible = false; > obj3.layer.visible = false; > }else{ > //trace("Visible:"+obj3.name+" "+obj3.screenZ); > obj3.visible =true; > obj3.layer.visible = true; > } > } > } > > Tony > -- Rob Bateman Flash Development & Consultancy [email protected] www.infiniteturtles.co.uk www.away3d.com
