Why is the 0,0 for my layout grid not in the upper corner?

0 favourites
  • 6 posts
From the Asset Store
Snap to visible grid - perfect solution for any game genre
  • I cannot figure out how to get the 0,0 position properly located in the upper left corner. Right now it is showing something close to -318,-128. I don't know how I got it so offset in the first place.

  • Making a quick assumption - You're positioning your sprite at 0, 0 and you see part of it off the layout. By default, the center of the sprite is the origin point, so you are moving the center of the sprite to 0, 0.

    To move it to the top left, go into the sprite editor and change the "origin" imagepoint to 0,0.

    If that't not it, a screenshot or capx might describe your problem more clearly.

  • My 0,0 is located not even close to the corner. Let's say that my grid layout is 1512, 850. The 0,0 is located at about where 318, 128 should be if 0,0 were in the upper left position. It is currently well within the body of the grid. I just want to set it in its default position.

  • I was trying to make a HUD layer. I have traced the issue back to the parallax settings. When I set it back to 100, 100 , the images that I created on that layer snap back to their original position. Setting it at 0,0 causes the all the images on that HUD layer to shift over and down drastically.

    There appears to be something about parallax that I do not understand.

  • From how I understand it, a parallax of 0,0 means that the layer will not pan when the scrollx or scrolly positions change. So if an object on that layer is located at 0,0 for example, then it will always be 0,0 pixels from the top left of the viewport regardless of the scrollx,scrolly positions. If the parallax is 50,50, then if the scrollx,scrolly are at 50% (middle of the layout), then the object will appear positioned halfway from the 0,0 origin of the layout and the topleft of viewport. If parallax is 100,100, then it will be at 0,0 of the layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Look at the manual for expressions, for converting coordinates between the layers.

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