Changing character feet "hotspot"

Started by EliasFrost, Thu 12/09/2013 19:49:56

Previous topic - Next topic

EliasFrost

So I'm developing a game and in my character sprite set, I have drawn the character so that she have a shadow below her (due to this, her feet is probably 4 pixels above the bottom edge of the sprite/image) but I noticed a strange thing when I play the game, the "hotspot" (in lack of a better word) for the feet seem to be at the bottom edge of the sprite and thus my character don't really go to where I point with the cursor but a tad bit above it and it's not quite what I want. So my question is: is there a way to change this "hotspot" or do I have to sacrifice my fancy shadow to make things work as I intend?

Thanks!

Retro Wolf

I would have a look into "surfaces" for the shadow.

Billbis

Or define a negative value for your character(s) z on game start.
Code: AGS
cEgo.z=-4;

Khris

Quote from: Frostfalk on Thu 12/09/2013 19:49:56I noticed a strange thing when I play the game, the "hotspot" (in lack of a better word) for the feet seem to be at the bottom edge of the sprite
Not that strange, given that AGS can't possibly know where you want the actual hotspot to be. But yes, by changing the z value, you can move the sprite up and down in relation to the hotspot / pivot.

EliasFrost

Quote from: Khris on Thu 12/09/2013 20:11:54
Quote from: Frostfalk on Thu 12/09/2013 19:49:56I noticed a strange thing when I play the game, the "hotspot" (in lack of a better word) for the feet seem to be at the bottom edge of the sprite
Not that strange, given that AGS can't possibly know where you want the actual hotspot to be. But yes, by changing the z value, you can move the sprite up and down in relation to the hotspot / pivot.

I remember another engine that allowed the dev to set the hotspot for the sprite, though that was pretty much the only intuitive thing about it, just thought it was funny that AGS don't have such a feature, fortunately there's a very simple workaround as mentioned by you and the poster above, thanks for the answer. :)

SMF spam blocked by CleanTalk