If setting ownCanvas to the rest of the children doesn't fix it, then I'm not sure there is many options.
One thing you can also try is to movePivot() of the other children also, along with the above, it might help, but might not. Also you can try .pushfront=true to the object with ownCanvas or setting a manual Z with .screenZOffset=somenumber Without seeing your model, I would say the above might be tricky to get right, if not impossible. It's easier with less complex/intersecting models. -Pete On Fri, Oct 9, 2009 at 2:28 PM, Ronaldo <[email protected]> wrote: > > Hi, > > I'm trying to apply filters to a mesh in a 3ds model I've loaded. > Setting ownCanvas to true I get the filtes to work, but it changes the > z order of the mesh getting it behind other meshes in the model. > > my code: > > function createObject():void > { > var loader:LoaderCube; > var model:Max3DS = new Max3DS(); > loader = new LoaderCube(); > loader.loadGeometry("assets/models/model.3ds", model); > loader.addOnSuccess(loadedObject); > } > > function loadedObject(event:Loader3DEvent) > { > var obj3d:ObjectContainer3D = event.target.handle as > ObjectContainer3D; > obj3d.position = new Number3D(0,-100,0); > obj3d.ownCanvas = true; > > var my_filter:GlowFilter = new GlowFilter(0xFF0000, 1, 50, > 50, 50); > var myMesh:Mesh = obj3d.getChildByName("mesh1") as Mesh; > myMesh.ownCanvas = true; > myMesh.filters = [my_filter]; > > scene.addChild(obj3d); > } > > This works fine adding the filter to the mesh. But it also gets the > mesh behind the rest of the 3d object. > > Any ideas? -- ___________________ Actionscript 3.0 Flash 3D Graphics Engine HTTP://AWAY3D.COM
