I’ve been playing a bit with the new flash 10 3d possibilities, and found out that rotating a sprite in 3d is fairly easy:
var card:Sprite = new MyCard() card.x = 100 card.y = 100 card.z = 200 card.rotationX = -60 addChild(card)
Simple and effective, this shows the card rotated with perspective.
Now I want to use an orthographic projection, and I have no clue where to start. DisplayObject does have a perspectiveProjection member, but that can only make perspective projections of course. Maybe I should use the transform.matrix3D?
I’d think this should not be too hard, but I don’t see how to tackle this issue.
UPDATE: as one of the comments suggests: setting the perspectiveProjection.fieldOfView to something close to 0 (10 actually produces a nicer result in my setup than something like 0.1) you get a projection that is nearly orthographic, that might be good enough.
I finally got it working.
Now any element added to the sprite that has this transform applied to it will show up in isometric projection. (that 35.264 number is an approximation see http://en.wikipedia.org/wiki/Isometric_projection)