Hi, new mapper here, trying to understand slopes. I've got the AlignFloor working, but there are some situations where I can't use it. So I'm looking at sector FloorPlane equations. But what I'm seeing doesn't make sense.

So I start by making a square room, 128x128, around the origin, so from (-64,64) to (64,-64). I want to make a slope that is at flat 0 on the south wall and rises to 128 on the north wall.

So three points I could use are the two on the south floor, (-64,-64,0) and (64,-64,0). Then I can pick a point on north wall, so (-64,64,128)

I plug these three coordinates into a slope plane calculator and I get this out:

0x + -16384y + 15104z + -1048576 = 0

So I put this into my sector like this:

floorplane_a = 0;

floorplane_b = -16384;

floorplane_c = 15104;

floorplane_d = -1048576;

I notice these numbers look kinda big, and they make a ramp that is way high off the map. But I plug all three coordinates into that equation and it checks out, so what's the deal?

So I manually create the same ramp in UBD, using 0,45,64 as my rotation, angle, and offset. That gives me the ramp I want. I take a peek at the TEXTMAP and see this:

floorplane_a = 0.0;

floorplane_b = -0.707106781186547;

floorplane_c = 0.707106781186548;

floorplane_d = -45.2548339959391;

Very different numbers from what I got, and plugging those constants into the equation with any of those points doesn't check out. So is there a different equation in use or what?

Unfortunately I don't understand a lot about 3d math, I just want to know what equation I can plug in to get those a,b,c,d values out