Topic: EnableCameraLayer

I have a hard time making it work with the enableCameraLayer function. I have set a new scene, naming it scene2. I made another camera in that scene naming it camera2 and then put a text in front of it just for testings sake.



In my first scene I have written in the script:

scene2 = getScene("scene2")
camera2 = getObject("camera2")

and under sceneUpdate I have written:

enableCameraLayer(camera2, scene2)

and then I launch my game but nothing happens and I can't see the text from the other scene.

Is it something I have missed out? Like needing scripts for every scene or is it one script for every scene?

Pär

Last edited by Pär (2013-01-16 23:39:08)

Re: EnableCameraLayer

You don't need to rename the camera in scene2,
so for example, put a new camera in your first scene, name it "Maincam"

Then in script :

scene2 = getScene("scene2")
Maincam = getObject("Maincam")
enableCameraLayer(Maincam, scene2)

function OnSceneUpdate()
...

Re: EnableCameraLayer

Thanks, now I understand.

Re: EnableCameraLayer

THANKS. That's awesome.

Re: EnableCameraLayer

Yeah it's incredbly useful, thanks to the boss wink