[英]ActionScript 3, Flash Player 10 - 3d carousel changes perspective, alignment issues
We made a 3D carousel with the new native 3D support from flash. 我们制作了3D轮播,并提供了来自Flash的新原生3D支持。 Now when I resize, my carousel should drag along the middle.
现在,当我调整大小时,旋转木马应该沿着中间拖动。 Which it does fine.
哪个很好。 But for some reason the perspective doesnt come along, therefore it looks like the more i resize, the more the carousel is leaning to the left side.
但是由于某种原因,透视图无法显示,因此我调整大小的幅度越大,轮播越倾向于向左侧倾斜。
The carousel is set up very simple. 轮播的设置非常简单。 Everything rotates around the x-axis with a set distance, the x-axis where the objects revolve around is 0. I just move the whole container to middle of the screen.
一切都围绕x轴旋转一个设定的距离,对象围绕其旋转的x轴为0。我只是将整个容器移动到屏幕的中间。
to illustrate: 为了显示:
http://www.stijlfigurant.nl/stuff/xaxis1.png http://www.stijlfigurant.nl/stuff/xaxis2.png http://www.stijlfigurant.nl/stuff/xaxis1.png http://www.stijlfigurant.nl/stuff/xaxis2.png
is there a way to solve this or should i go back to good old papervision? 有什么方法可以解决这个问题,还是我应该回到旧的papervision?
Hard to know quite what to suggest unless you post some code. 除非您发布一些代码,否则很难知道该建议什么。
There's nothing wrong with Papervision, but it's probably overkill for a simple carousel. Papervision没什么错,但是对于一个简单的轮播来说,这可能是过大了。 Lee Brimelow has a good tutorial for a 3D carousel here: http://www.gotoandlearn.com/play?id=92 which drags around without distortion quite nicely.
Lee Brimelow在这里有一个很好的3D旋转木马教程: http : //www.gotoandlearn.com/play?id = 92,它可以很好地拖动而不会变形。 (It might be worth noting that the 3D carousel is way overplayed, but that's as may be.)
(这可能是值得一提的是,3D旋转的方式夸大,但这是为可能。)
我通过将root.transform.perspectiveProjection.projectionCenter设置为舞台的中心来修复它!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.