-SOLVED- Problem with Object baseline

Started by Rik_Vargard, Sun 08/10/2023 13:56:16

« previous - next »

Rik_Vargard

Here's the problem:

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

I also tried
Code: ags
 oElevator04.Baseline = player.y - 1;

It only happens in this particular room.

Any ideas?


Khris

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.

Rik_Vargard

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?


Khris

#3
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.

Rik_Vargard

Alright! Thank you very much for your explanations  (nod)

SMF spam blocked by CleanTalk