Hotspot?

New releases and general discussions.

Post » Sat Sep 19, 2009 12:40 pm

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
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Sat Sep 19, 2009 2:10 pm

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.
B
2
S
2
G
3
Posts: 105
Reputation: 1,510

Post » Sat Sep 19, 2009 2:33 pm

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
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sat Sep 19, 2009 4:52 pm

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.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Sat Sep 19, 2009 7:32 pm

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.
B
2
S
2
G
3
Posts: 105
Reputation: 1,510

Post » Sat Sep 19, 2009 9:08 pm

[quote="GMG":pe0ibdio]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.[/quote:pe0ibdio]

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.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sun Sep 20, 2009 1:11 am

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.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Sun Sep 20, 2009 7:23 pm

Log a bug for it, that sounds like the best thing to do.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests