How do I use SnapX/Y to align these two objects?

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • When I use SnapX/Y to align these two objects, the one with Tile Movement behaviour aligns to the top-left corner of the tile, while the object without Tile Movement aligns to the bottom-right corner.

    I'm trying to click on a tile, and set the sprite without Tile Movement behaviour to that tile's top-left corner.

    (And the origin points for both sprites are in the top-left corner).

    Hopefully I'm making a simple error! I've attached a sample project below. Thanks to anyone who can help!

    drive.google.com/file/d/1iEKJgXDJx_acmstiNzglxWC7WYHyMmSs/view

  • The yellow square is snapping into the tileset which the Pink square does not have. So when you click a square the pink square goes to the origin of the tile you picked with the center and matches its center there (So it does not line up).

    Technically setting the origin of your pink square to the center fixes - not sure if that messes up anything down the road - I have only made 1 project with tilesets so I'm not that well versed in them ;D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for your help! I think that workaround should fix it.

    I guess I still don't understand why tilesets use the top-left corner of the grid, but otherwise, construct uses the center of the tile?

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