« iTunes CoverFlow Flex 2 component with Away3D
» BitmapData and Matrix weirdness

Away3D

Away3D is a lefthanded system

05.08.08 | 1 Comment

While most 3D coordinate systems are right handed, Papervision3D and Away3D are left handed, like this:

So every axis points into the positive direction and that’s what puzzled me for about two months while using Away3D; why do my 3D objects appear on the left side of the 0,0,0 position when I create them, while they should appear on the right hand side. This is what the code looks like:

1
2
3
4
5
6
var view3D:View3D = new View3D();
 
this.addChild(view3D);
var sphere:Sphere = new Sphere({radius:200, segmentsW:10, segmentsH:10});
sphere.position = new Number3D(0, 0, 0);
view3D.scene.addChild(sphere);

Here’s the answer: This is because how the view3D instance is initialized. If you don’t pass an initObj to the constructor of the view3D, the camera is positioned at z=1000 and told to look at the center. So the camera is looking towards you, so the whole coordinate system is the other way around.

Glad I figured this one out, I was starting to loose my mind ;-)

1 Comment

have your say

Add your comment below, or trackback from your own site. Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

:

:


« iTunes CoverFlow Flex 2 component with Away3D
» BitmapData and Matrix weirdness