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?

Reply via email to