How do I get a simple lightning effect (couple of layers)?

0 favourites
  • 3 posts
From the Asset Store
J-BoB Magic Series LIGHTNING Sound Pack comes with 465 high-quality sound effects
  • Hello everyone,

    It is possible to create simple lightning effect (like this one: https://www.youtube.com/watch?v=egL-xXri_Xk) but on 3 layers with parallax?

    Take a look on my layers:

    - Layer with "black material" and "force own texture" (as it was in tutorial above)

    - Layer A (Parallax: X:100%, Y:100%) <- I want to put here one Light object and pin it to other object

    - Layer B (Parallax: X:50%, Y:50%) <- I want to put here another Light object and pin it to another object

    Is it possible? Putting Light objects on layer with "black material" and setting their positions on objects on other layers, the Lights can't set this position precisely because of parallax in project.

    Can you help me? :/

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • KacperStasieluk

    the trick to get from a position on one layer to same place on a different layer is to use LayertoCanvas from the source layer and then take those canvas coordinates and plug them into CanvastoLayer on the destination layer.

    I made a quick sample to show you (based on that tutorial you linked to).

    I made the mask layer have the same parallax settings as the Game layer, so the glow object can just be pinned to a light source on the game layer. But any light source on a layer with different parallax settings needs to manually set the glow position using the layer to canvas - canvas to layer method.

    so, in my sample there are two torches on the game layer and some fireflies, and the player has a very dim light too. Then there is a torch on the layer behind that (with 50% parallax), and a moon on the back layer with 0% parallax.

    https://www.rieperts.com/games/forum/LightMask.capx

  • It works, awesome! Thank you VERY MUCH! :D

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