Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Matti on Wed 17/10/2018 15:55:32

Title: object blocking height issue
Post by: Matti on Wed 17/10/2018 15:55:32
I haven't worked with blocking objects in a long time and now that I do I'm having some issues. I think it isn't very convenient that the blocking height is centered around the baseline, because in most cases you'd want an object to be blocking from the lowest point upwards.

In my case, the character walks right through the chair, but cannot go past below it. I tried changing the chair's baseline but that didn't change the blocking area. I could use a dummy object or alter the walkeable area, but I'm not sure if I'm doing something wrong with the baselines or if there's another way to accomplish this.

Here's the situation with the walkeable area minus the blocking rectangles which are way off:

(https://i.imgur.com/eWeI8Kp.png)
Title: Re: object blocking height issue
Post by: Khris on Wed 17/10/2018 15:59:35
Yeah, those blocking rectangles seem to assume that objects and characters have no depth. To add insult to injury, Objects don't have a .Z property.
If that chair isn't going to move, just draw the hole by hand.
Title: Re: object blocking height issue
Post by: Matti on Wed 17/10/2018 21:41:30
Hm, I thought so. The chair doesn't need to be moved so I'll just cut a hole into the walkeable area. But maybe this is something that should be improved. I remember quite a few situations in other games where the characters would walk around objects rather strangely. Now I know why ;)

EDIT: It's even worse that the vertical center of the rectangle is one pixel below the lowest pixel of the sprite.
Title: Re: object blocking height issue
Post by: Khris on Thu 18/10/2018 13:27:14
Re edit: afaik that's the position of the object; AGS subtracts the sprite height when drawing it, so the lowest pixel of an object is always one pixel above its actual position.
Title: Re: object blocking height issue
Post by: Monsieur OUXX on Mon 22/10/2018 14:12:07
Yes. More generally, this might be a direction to follow for improvement : One should be able to configure the "ground point" of objects and characters. The fact that it's tied to the lowest pixel can be really annoying if there's, let's say, a cast shadow below. That means that the .z property should be universal, and, why not, configurable in the GUI.
Title: Re: object blocking height issue
Post by: Matti on Tue 23/10/2018 10:33:55
Monsieur OUXX, I started a thread (http://www.adventuregamestudio.co.uk/forums/index.php?topic=56555.0) in the editor development forum. If you want, bring in your ideas there.