[solved] 2D Orthographic camera

Hey,

I’d like to have a 2D orthographic camera and I already tried several solution from the Forums but nothing worked so far:

when I rotate my Card texture for 90deg on the Y it should be invisible or really thin on any positon, but i always geht this 3D perspective look, can anyone help me with a good solution to make my Default camera a true orthogtraphic one?

HI,

that sounds like you just need to make your ( at default perspective camera) an orthographic one like this :

As documented in http://cocos2d-x.org/docs/cocos2d-x/en/3d/camera.html

yeah i’ve tried this already but it somehow doesn’t work, maybe I’m using it wrong?

because it has no effect at all, i mean normally the 2d graphics alreaddy appear orthograpic like, as Long as you don’t use the Z axis, maybe since i use the Rotation which also has affect on the Z axis the orthographics stuff doesn work in cocos?, thats just something that i’ve read in other discussions. which would really suck ._.

or maybe i’m really jsut using it wrong, would be great if some1 could give an example how to use the new orthographic camera with sprites, or how to make the Default cameraa an orthographic one

still no solution to this, can anyone help?

Why do you need a camera in a 2D game?

because the default one produces a perspective like look when rotating objects and shown in the picture above

I looked in cpp-tests and I don’t see anything. I have asked the engineering team for advice.

solved!,

this is totally my fault.
it appears, that i’ve used SetRotation3D.
I think i’ve used it because at first i couldn’t find a SetRotationY(which is available) and only found a setrotation, and therefore used the 3D one.

sorry guys ._.

Can you share your code so we can take a look?

the orthographic Problem is already solved.

prob. the reason why i used the 3D rotation was a different one, using RotateBy::create(.3f, Vec3(0.f,90.f,0.f)) caused a Crash when initially using RotationY on the sprite, seems like you cant use both. but I wanted to work with all 3 axis to rotate

Even in 2d, seperate X,Y,Z Rotations are great. I’ve tried now to use :
RotateBy::create(.3f, 0.f, 90.f) //(time,X,Y) but using the Y axis to rotate 90.f with this RotateBy creates a weird Rotation, definately not an raw Y Rotatio like SetRotationY

seems like RotateBy:: uses Y_Z axis? idk

I’ll create a seperate post for this