I’m having a hard time making heads or tails of this.
I know that sprite x/y positions are relative to the sprite’s top-left corner (I’ve suggested that they be changed to the sprite’s center but that’s another conversation…).
What I don’t understand is that when I position a canvas so that it’s top-left corner (0,0) touches a button’s bottom-right corner and then – with only the blocks below added to the sprite – I preview the project, the sprite re-sizes itself and moves and ends up in a place that definitely isn’t x=0, y=0.
This video shows what happens when I press the preview button:
Ignore the three game pieces above the button & canvas area.
I tested the project @tatiang sent and set the x and y to 25 as mid-point and it behaved as expected. I set the other sprite to 50 and it also showed expected outcome.
@muneer thanks for confirming that. I actually did find the same to be true. My sprites still resize and move which is weird but at least they end up in the right spots using your values:
I’m working on a snap-to-grid demo and it works well but if I give the sprite any momentum when dropping it, it glides to a new position that is no longer snapped to the grid.
Does anyone know how to prevent that? I basically want to disable movement for the sprites. They should be draggable but not moveable if that makes sense.
How do you do that? I’m using the drag-and-drop interface and the only thing I see is “frame color.” When I set that, it seems like it might show up in the Design tab but when I preview it, the stage doesn’t have a border.