Z-rendering order wrong @ air mobile

Software: Away3D 4.x

_spring, Newbie
Posted: 09 September 2012 05:45 PM   Total Posts: 3

Hey guys,

i’m getting a strange rendering error if i build my scene with air mobile.

The image of the testscene show the main problem: objects which hav a greater distance to the camera are rendered first, and i dont know why.

The main code is here:

_view = new View3D();
   
addChild(_view);
   
_view.scene.addChild(new Mesh(new CubeGeometry(), new TextureMaterial(new VideoTexture(File.userDirectory.url+"/ABA/video_technik_001.flv"256256truetrue)))); 
   
_view.scene.addChild(new Mesh(new CubeGeometry(), new ColorMaterial(0x00FF00)));
   
_view.scene.addChild(new Mesh(new CubeGeometry(), new ColorMaterial(0x0000FF)));
   
_view.scene.getChildAt(0).= -100;
   
_view.scene.getChildAt(1).= -200;
   
_view.scene.getChildAt(2).= -300;
   
   
_view.camera.= -200;
   
_view.camera.300;
   
_view.camera.lookAt(new Vector3D());
   
   
_cc = new HoverController(_view.cameranull4510800);
   
// entry point
   
addChild(new AwayStats(_view));
   
   
addEventListener(Event.ENTER_FRAMEupdate);
   
addEventListener(MouseEvent.MOUSE_DOWNonMouseDown);
   
addEventListener(MouseEvent.MOUSE_UPonMouseUp); 

The rest of code is just for camera moving.
If i use just ColorMaterials (without TextureMaterial) the error also appears.

my software:
flashdevelop 4.0.4RTM
away3d 4.0.9 gold
flexsdk 4.6.0 with air 3.3 (mobile)

hardware:
htc evo 3d (android 4.0.3)with newest air installed

 

 

   

John Brookes, Moderator
Posted: 09 September 2012 06:00 PM   Total Posts: 732   [ # 1 ]

Add

<depthAndStencil>true</depthAndStencil>

to your aplication.xml

   

_spring, Newbie
Posted: 09 September 2012 06:15 PM   Total Posts: 3   [ # 2 ]

You saved my evening!


thanx a lot!!!

   
   
‹‹ delete me

X

Away3D Forum

Member Login

Username

Password

Remember_me



X