@jalfonsosm wrote:
Hi,
I want to use a camera in my 2d game since I want to have different layers with different z values and create a depth effect.
I am also using a render to texture as root node in order to apply post process effects to the whole scene.
The scene has this structure:
scene->renderToTexture ->mainNode->severall sprites and layers...
I have tried to use the default camera of the scene, but it cant be translated. its position is reseted in each frame. it seems that this camera should be used for UI elements. So I have created a new one, this camera has the user1 flag
I tried to set the camera mask of the main node to user1, but the results is a black screen.
If I set the camera mask of the render to texture to user1, then the scene is properly renderer and the camera can change its position. However, the render to texture follows the camera and the content doesnt cover the screen
What should be solution for this problem? I want my render to texture to be centered in the screen and the camera should only affect to its childrens (in this case the main node)
Thanks!
Posts: 3
Participants: 1