centering actors on scrollable layer?
a.grajirena
Member Posts: 21
i have a background layer that scrolls along an x axis as a main character (controlling camera) moves left and right. on that background layer i have an actor that is a window. i would like for the window to spawn an actor that is a larger "close-up" window when tapped, to simulate looking through it. the close-up needs to spawn centered on the screen, and remain centered (even if the character moves, scrolling the background) until it (the close-up) is tapped, which destroys it.
it seems spawning the close-up on a non-scrolling layer would be ideal, but since it is triggered from a scrolling layer i can't seem to do this. what i've been trying to do is place the close-up into the scene and on it's own no-scroll layer and setting the alpha to 0. then i make rules to pass a boolean attribute, closeupVisible, from the small window to the invisible close-up that change the alpha attribute from 0 to 1. I can't get this working though, and wonder if there is an easier way...
thanks!
it seems spawning the close-up on a non-scrolling layer would be ideal, but since it is triggered from a scrolling layer i can't seem to do this. what i've been trying to do is place the close-up into the scene and on it's own no-scroll layer and setting the alpha to 0. then i make rules to pass a boolean attribute, closeupVisible, from the small window to the invisible close-up that change the alpha attribute from 0 to 1. I can't get this working though, and wonder if there is an easier way...
thanks!
Comments
When the level is done I interpolate the main character to the center of the screen, however I can't determine where the center is.
Sorry for the thread hijack!
I just wanted to point out that I'm in the same boat