exdev / ex2d

Documentation, runtime scripts and others of ex2D
www.ex-dev.com/ex2d
43 stars 9 forks source link

exViewportPosition & exScreenPosition not working with perspective camera #15

Closed jorrit-de-vries closed 12 years ago

jorrit-de-vries commented 13 years ago

When using a perspective camera, bot the exViewportPosition and exScreenPosition components do not work as expected. Having a perspective camera would allow to mix 2D and 3D assets easily, without the need of having multiple cameras.

I used the demo_simple_sprite_anim Changed Camera projection setting to Perspective Set Transform2D property to Viewport Checked Use Pixel Perfect (set to true) Played with the exViewportPosition component Changed the z position.

Expected: Sprite is displayed at same position (as in orthographic projection)

Maybe my expectation is incorrect.

Using version 1.2.1 (evaluation), have tested as well as with the current master branch, compiled on Windows

jwu commented 13 years ago

I've fix the problem. The fixes will available in 1.2.2 a few days later

jorrit-de-vries commented 13 years ago

Great, thank you!