Absolute X and layer.X

  • I am struggling with this one,

    I have a layout that is using parallax layers all moving at different scroll rates, and an object that moves from layer 0 through to layer 7..

    the problem is that as it changes layer it maintains it's x, but the layers x is offset due to the parallax scroll, causing a visible shift, so I need to place the object, and move the object to an absolute x that is indifferent to the layers scroll rate, is this possible?...

    thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you could put another layer where you want it to appear with the same layer parallax

    c|;-)>---

  • Yes, but I would have the same problem with that layer...and ultimately all the layers would have the same scroll rate...

  • I use "layer(0).x" for example, where '0' is the number of the layer. I always keep that layer's scale etc. the same so it will always work well.

  • Tobye Thanks, I will try that later...

  • This is still not working for me, I still need a way to either calculate or reference an absolute X,Y position, from any given layer despite positive or negative layer offset...help, please...

  • sounds like a pretty awkward problem, but you can find coordinates of objects' positions on any layer using layertocanvasX/Y and canvastolayerX/Y expressions.

    Unfortunately there is no direct LayertoLayerX/Y to make it easier, but it's a start at least.

    anyway, you'll see them listed in the expressions panel, and the manual will do a better job at explaining than me

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