view is in the wrong place

Software: Away3D 4.x

JakobWagner, Newbie
Posted: 12 December 2012 03:22 PM   Total Posts: 5

Hi

I’m comming back to away after not using it for a looong time. I’m trying to do this tutorial: http://away3d.com/tutorials/Setting_Up_Your_Scene wich is VERY basic. However, I can’t get it to work correctly. As you can see on the image, the views y position seems to be off by almost a half screen.

View image

What is coursing this?

Thanks,
Jakob

My code:

package
{
 import away3d
.containers.*;
 
import away3d.entities.*;
 
import away3d.materials.*;
 
import away3d.primitives.*;
 
import away3d.utils.*;
 
 
import flash.display.*;
 
import flash.events.*;
 
import flash.geom.Vector3D;
 
 
[SWF(backgroundColor="#000000"frameRate="60"width="640"height="960")]
 
 
public class flaraway extends Sprite
 {
  [Embed
(source="../assets/checker.png")]
  
public static var checker:Class;
  
  private var 
view:View3D;
  private var 
plane:Mesh;
  
  public function 
flaraway()
  
{
   super
();
   
   
stage.align StageAlign.TOP_LEFT;
   
stage.scaleMode StageScaleMode.NO_SCALE;
   
   
view = new View3D();
   
addChild(view);
   
view.camera.= -600;
   
view.camera.500;
   
view.camera.lookAt(new Vector3D());
   
   
plane = new Mesh(new PlaneGeometry(700700), new TextureMaterial(Cast.bitmapTexture(checker)));
   
view.scene.addChild(plane);
   
   
addEventListener(Event.ENTER_FRAMEthisEnterFrame);
   
stage.addEventListener(Event.RESIZEstageResize);
   
   
stageResize();
  
}
  
  
private function thisEnterFrame(e:Event):void
  {
   plane
.rotationY += 1;
   
plane.+=1;
   
   
view.render();
  
}
  
  
private function stageResize(event:Event null):void
  {
   view
.width stage.stageWidth;
   
view.height stage.stageHeight;
  
}
 }
   

JakobWagner, Newbie
Posted: 13 December 2012 08:28 PM   Total Posts: 5   [ # 1 ]

Just realized the screenshot was pretty hard to understand.

I have uploaded a new one better explaining my problem.

See screenshot

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X