开发者

Dynamically change 3D Center point in FlashCS4

开发者 https://www.devze.com 2022-12-18 13:12 出处:网络
Using the new 3D features in CS4. I know you can change the 3d center point manually v开发者_开发知识库ia the Transform panel, but does anyone know how to do this dynamically at runtime? (ie via code)

Using the new 3D features in CS4. I know you can change the 3d center point manually v开发者_开发知识库ia the Transform panel, but does anyone know how to do this dynamically at runtime? (ie via code)


i didn't know that too, but i did a quick google research and found this

i guess something like this will do the trick:

this.transform.perspectiveProjection.projectionCenter = new Point(200,200);


Excellent, I struggled with this, really pleased it was so simple to fix, though not so simple to find anything on. For centering I used it like this:

var centre:Point = new Point(stage.stageWidth / 2, stage.stageHeight / 2);
parent.transform.perspectiveProjection.projectionCenter = centre;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号