Origin and imagepoints

0 favourites
  • 9 posts
  • I've only just noticed that you CANNOT place an origin or imagepoint at half-pixel positions - which makes certain sprite sizes incredibly irritating (like having an odd number of pixels) since your "center" point is always one pixel either left or right. It's not really a big deal unless you have very small/low-res graphics (especially if you're using layer zoom or similar pixelation methods) and you want to do stuff like rotate an object.

    The editor allows you to place them at half-pixel increments, but it doesn't save/commit those point coordinates and translate into the game.

    Is there a reason it's is like this? How have I only just noticed now and not before?

    ~Sol

  • It is especially annoying when the sprite needs to be mirrord.

  • what do you mean? ofc it can be placed, depending on your size of sprite, which needs to be 2ˇn example:

    if you put on sprite 20x20 on point (10,10) - you have 10 points to left and 10 to right to get 0,10 or 20,10.

    if you have a sprite that's 19x19, and you plaec it on point (10,10) - you have 10 to left, and 9 to right side. same happens when you put on 9,9, just opposite ways.

  • and you plaec it on point (10,10) - you have 10 to left, and 9 to right side.

    And this is the problem I'm talking about. It's un-even.

    You can't place the origin point at 9.5 (well you can, it just doesn't SAVE there) - only at 9 or 10 - leaving 10 to the left and 9 to the right, or 9 to the left and 10 to the right. Right?

    ~Sol

  • yes but that happens when you have uneven size of sprite - 1/3/5/7/9... x 1/3/5/7/9... they have no midpoint, but 2/4/6/8... x 2/4/6/8... have midpoints.

  • yes but that happens when you have uneven size of sprite - 1/3/5/7/9... x 1/3/5/7/9... they have no midpoint, but 2/4/6/8... x 2/4/6/8... have midpoints.

    This was what my original post is about... having a sprite of "un-even" or "odd" amounts of pixels.

    My game character(s) are an un-even/odd amount of pixels wide - so they can have a single pixel for a nose or bellybutton, instead of a 2px wide "line". It's incredibly frustrating to juggle imagepoints around to line things up properly for each rotation of my character - only to have it fail as soon as I want to rotate/angle a part of the body as well, and it just looks wrong.

    ~Sol

  • did you try resizing sprite with +1 pix in width / height? engine will choose itself the best place to add the pixels so you might not lose your nose

  • If you're not resizing them I would suggest not using image points, and just placing them manually. Hotspot x-1, y+4 etc.

    Image points uses some trig that won't always work correctly at that size due to the math with angles.

    A non trig type of behavior to replace Pin might be in order here.

    It just wouldn't handle scaling very well, or rotations....

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah I have a few workarounds, like placing manually... it's just, annoying that C2 can't store origin/image points at increments of pixels (at least 0.5) because odd width sprites surely aren't THAT uncommon.

    Fortunately in my particular instance, I have already sorted a work-around for the issue, but it was a hard coded case-by-base solution.

    I seem to remember CC being able to place the old "hotspot" at any increment of pixel? It's just particularly strange that the C2 image editor allows you to place them at any increment as well, but it rounds it to the nearest whole pixel once you save and close the editor or change to a different animation or frame.

    ~Sol

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