Situation: I want to pin/set the position of a sprite (=light effect) to the moon but the sprite has to be on the light layer to maintain it's light effect and the moon should obviously stay in the background aswell.
Problem: Now the problem is that the light layer has a different parallax scrolling than the background layer. Wich means that onscreen the light will never have the same position as the moon.
Add a second light layer with the same parallax as the background layer.
The thing is, the Light Layer is just a black layer and the sprites have the blend mode effect "Destiniation out". So if I would make another layer the black of the light layer would still cover the moon in the background.
Sorry for the missing info!
Develop games in your browser. Powerful, performant & highly capable.
Then set the current light layer with the same parallax as the background layer? Your problem is that you can't get the light on the light layer to match up with the moon's position right? It should work fine.
An example capx may help.
[quote:3oa9z0hj]Your problem is that you can't get the light on the light layer to match up with the moon's position right?
But the light layer should maintain it's parallax (100,100) since it also contains light effects for the mainlayer (100,100).
Background parallax (0,0)
Sorry for the late reply and thanks for your patience!