How do I pin an object to something on a different layer?

0 favourites
  • 5 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • 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.

    Layer order:

    ?Light Layer

    ?Main Layer

    ?Background Layer

  • 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!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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?

    Yes, exactly!

    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!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)