0 Favourites

Sprite Position(X,Y) BUG or I missed something?

  • [attachment=1:qtqs4m76][/attachment:qtqs4m76]

    [attachment=0:qtqs4m76][/attachment:qtqs4m76]

    Observe the above two images. Both sprites are Left Aligned(using Align->Edges->Left) to the same X on the layout. However when you click on individual Sprites it shows two different X values!! Sprite 1 is at X=112, Sprite 2 is a X=120.

    I noticed the same happening for Y also.

    Is there something I am missing or did I just find a BUG? The game I am trying to create is based on X, Y position, however due to this difference I have not been able to check the co-ordinates properly.

    Please help!

  • As you can see on your images. Origin (Image point) is set to center of this black sprite, and for the character sprite is set way off to the right. X and Y positions are based on Origin.

    and before you think of making your game check the manual and complete all beginner tutorials.

  • Hi shinkan Thanks for the response. I should have checked that. But does this mean, by default the Origin is always the center and if we have to get the Left(X) and Top(Y) position we need to calculate it?

  • You can set the origin where ever you want. Double click each sprite to enter the image editor and choose the tool that looks like a little cross-target. This is the "Set Origin and Image Point tool".

    Click anywhere to set a new origin point position, or use the X,Y numeric values on the top.

    Alternatively, the numpad keys provide quick "hard" left, right, top, bottom, "dead" center and the at the four corners shortcuts.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Thanks eli0s and shinkan

    Would be great if you can help me in the following thread. I am trying to achieve a infinite diagonal scrolling effect

    EDIT: Not allowing me to paste URL

    The topic title is "Infinite Diagonal Scrolling (For endless runner)" under "HOW DO" I section of the forum

  • I am sorry, I can't help you with that, it's too complicated for my sills. I suspect it involves trigonometry (for the drifting problem that you mention on your other post https://www.scirra.com/forum/viewtopic.php?f=147&t=101408&p=765172&hilit=Infinite+Diagonal+Scrolling+For+endless+runner+#p765172 ), some kind of picking with UID and index loops. Perhaps some, all, or none of the above.

    I know that there are people here at the forums that see these stuff as mundane and trivial. You know, the smart kind of people

    Perhaps some guy or girl will be able to provide you with some useful input.

    Meanwhile, there are two example templates for procedurally generated levels that come with construct, an infinite vertical jumper and an auto-runner. Choose File/New and search for them, I am sure you'll find useful stuff inside them!

  • Hey eli0s.. thanks again man! I agree with you on that.. I hope some of "them" respond

    My code is somewhat based on the Autorunner template itself. I didnt look at the procedural level template. Will have a look at that

  • By procedurally generated levels I meant those two: the auto-runner and the infinite jumping templates. As I see know, there is also a Flapping bird template.

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