Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: EliasFrost on Thu 12/09/2013 19:49:56

Title: Changing character feet "hotspot"
Post by: EliasFrost on Thu 12/09/2013 19:49:56
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!
Title: Re: Changing character feet "hotspot"
Post by: Retro Wolf on Thu 12/09/2013 19:58:38
I would have a look into "surfaces" for the shadow.
Title: Re: Changing character feet "hotspot"
Post by: Billbis on Thu 12/09/2013 20:04:58
Or define a negative value for your character(s) z on game start.
Code (AGS) Select
cEgo.z=-4;
Title: Re: Changing character feet "hotspot"
Post by: 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.
Title: Re: Changing character feet "hotspot"
Post by: EliasFrost on Thu 12/09/2013 21:04:59
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. :)