Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Rik_Vargard on Sun 08/10/2023 13:56:16

Title: -SOLVED- Problem with Object baseline
Post by: Rik_Vargard on Sun 08/10/2023 13:56:16
Here's the problem:

The Object stays in front of the player.
BaselineOverridden = false;

I also tried oElevator04.Baseline = player.y - 1;
It only happens in this particular room.

Any ideas?

(https://i.imgur.com/7VpOWgh.png)
Title: Re: Problem with Object baseline
Post by: Khris on Sun 08/10/2023 19:23:59
Leaving BaselineOverridden at false means that AGS will use the y coordinate of the object, which is further down than the player's feet.
You need to set BaselineOverridden to true, then type the y coordinate into the Baseline field that appears.
Title: Re: Problem with Object baseline
Post by: Rik_Vargard on Mon 09/10/2023 16:58:01
Hey @Khris , thanks for replying.

I tried the "true" thing but it didn't work, or maybe I did it wrong.

I tested and realized that the object was the very same height as the room (1080p), so it's on the bottom.
So I remade the room and the object and it's now higher than the bottom and it "works" with "false", but I had to adapt the walkable area...

And now that I re-read your answer, is it so that I shouldn't have put it on true, and on 1, but on 1080 instead then?

Title: Re: Problem with Object baseline
Post by: Khris on Mon 09/10/2023 20:40:36
Once you override the default baseline, you need to pick the proper value. In this case somewhere around 800 or something.
AGS draws stuff back to front, but it has to know what's further back. So what actually determines the drawing order is the baseline of each object, or the 2D y coordinate where the 3D object meets the 3D ground (where its shadow would be at high noon).

So again, you put BaselineOverridden on "true", then enter a number like 800 as the Baseline. Also, if that part of the room will always appear behind everything else, then yes, just enter 1 as the baseline.
Title: Re: Problem with Object baseline
Post by: Rik_Vargard on Tue 10/10/2023 06:45:54
Alright! Thank you very much for your explanations  (nod)