Hotspot?

This forum is currently in read-only mode.
  • When placing the hotspot it seems like it's placed in the middle of a pixel, meaning if you have a 1*1 pixel sprite and place the hotspot in the middle, the image editor is displaying the hotspot in the middle of the sprite.

    It appears though like the hotspot is actually placed in the upper left corner of the pixel it appears to be in the middle of. So i think it would be good to either change that, or change the way the image editor is displaying the hotspot.

    Jonatan

  • the hotspot IS the entire pixel. This is the only way it can work - you can't place the hotspot in any particular part of the pixel - the coordinates for the hotspot are the exact same ones as the pixel it is placed in. When you are zoomed in, the pixel looks like it has a width and height, but this is deceiving - the pixel only has xy coordinates within the whole image.

  • for practical purposes though

    if you want to place something at the hotspot of a sprite, get its screen coordinates or rotate it, it has a position within the enlarged pixel

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • of course the hotspot is only one pixel wide, but the problem is: I'm enlarging the sprite to 32*32, and then mirroring it, wich moves the sprite 32 pixels. And in that case it is missleading to show the hotspot in the middle of the sprite when it's zoomed in in the image editor, but in the corner when you exit the image editor.

  • I see what you mean now. I've also wondered about flipping sprites with regards to the hotspot position, although not with the idea of scaling to those magnitudes.

    I suppose you could mitigate this problem a little, but not entirely, by using double or quad sized pixels (i.e. hs at [3,3] on an 8*8 sprite). If the hotspot is in the centre of this chunky pixeled sprite, it won't shift so much when you flip it.

  • I see what you mean now. I've also wondered about flipping sprites with regards to the hotspot position, although not with the idea of scaling to those magnitudes.

    I suppose you could mitigate this problem a little, but not entirely, by using double or quad sized pixels (i.e. hs at [3,3] on an 8*8 sprite). If the hotspot is in the centre of this chunky pixeled sprite, it won't shift so much when you flip it.

    Yeah, just give the image a bounding box with a transparency. Ie your image would be 3x3 instead of 1x1, with the original pixel in the center.

  • That wouldn't be correct. I would have to make my image 2*2 pixels with my hotspot in the lower right corner for it to actually be in the center. It's still wierd. It's not really a bug or a problem, it's just something that i think should be corrected.

  • Log a bug for it, that sounds like the best thing to do.

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