So far I have learned that zdoom uses plane equations to define slopes.

I have this sector in my map:

- Code: Select all • Expand view
`sector // 6`

{

heightfloor = 0;

heightceiling = 0;

texturefloor = "ASHWALL2";

textureceiling = "ASHWALL2";

lightlevel = 192;

floorplane_a = 0.0;

floorplane_b = 0.316227766016838;

floorplane_c = 0.948683298050514;

floorplane_d = -399.711896245283;

ceilingplane_a = 0.0;

ceilingplane_b = -0.3162278;

ceilingplane_c = -0.9486833;

ceilingplane_d = 414.890829;

xpanningceiling = 0.0;

ypanningceiling = 0.0;

rotationceiling = 0.0;

xscaleceiling = 1.0;

yscaleceiling = 1.0;

xpanningfloor = 0.0;

ypanningfloor = 0.0;

rotationfloor = 0.0;

xscalefloor = 1.0;

yscalefloor = 1.0;

comment = "@test";

}

As I understand d is distance in plane equation. But when I change d by 320 and leave everything else unchanged, the floor does not raise by 320 as I expected but by 337 instead.

Here is a diff:

From which it can be seen that both distances are exactly changed by 320. But in game the height difference at same x,y location is 337, not 320. How do I exactly have to calculate these numbers if I want the exact same tilt on each axis but different height?

I am asking it because I am interested in writing my own custom function that takes sector data in and returns sector that that has the same slope but is either higher or lower by specified amount and I thought that maybe someone who has dealt with it in zdoom or UDB source code might know some hints for that.