Setting the Stage vanishing point in as3

2010 January 21
by FlashMonkey

I was playing around with Flash Player 10 3D capabilities yesterday and thought it was worth posting how to set the Stage vanishing point (as it’s not that well documented). The vanishing point is set to the top left corner of the stage by default. The below code set’s it to the center of the stage:

root.transform.perspectiveProjection.projectionCenter = new Point(stage.stageWidth * .5, stage.stageHeight * .5);
2 Comments leave one →
2010 February 13

That’s a great bit of code that is very useful to create a more believable environment when you’re dealing with a lot of 3D elements. Thanks for posting that.

2010 July 6

glad i remembered who and where this was posted!

+1 saved ass…

cheers.

Leave A Comment

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS