Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Rocco on Fri 20/11/2009 17:37:39

Title: how to adjust the characters offset point?
Post by: Rocco on Fri 20/11/2009 17:37:39
i use a birdeye view.
So when i click some where on the screen, and the player walks to this point,
he doesnt stand in the right spot (allways to far above), cause the offset point is set to the feet of the characters (down-edge of sprite) per default.
how is it possible to change that point, within the character views?

the other problem based on this fact is, that the character moves way to far beyond walking areas
Title: Re: how to adjust the characters offset point?
Post by: monkey0506 on Fri 20/11/2009 20:05:59
You can use the Character.z property to offset the character's image (along the Y-axis) while leaving the Y-coordinate in tact for registering events and things.

So for example:

player.z = (HEIGHT / 2); // HEIGHT is the height of the player's sprite

That would center the character's graphic around his (X,Y) instead of being centered around his feet.