Aligning flats on 3D sectors

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Rex Claussen
Developer
Developer
Posts: 2659
Joined: Tue Jul 11, 2006 18:36
Contact:

Aligning flats on 3D sectors

Post by Rex Claussen »

I did a search on the forums and came up empty. How do I align flats on 3D sectors that do not fit within an editing grid (typically the 64*64 grid). I have some crates that are suspended from an overhead conveyor chain, and the in-game sectors overlap the grid. The flats for the crate tops and bottoms don't look right, because of course they are being drawn to fit the grid.

I tried using Line_AlignFloor & Line_AlignCeiling on the dummy sector but that didn't work. I even tried using those specials on the in-game sector (which I knew was not going to work), and sure enough it did not work.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

There both specials are nasty and useless: They need to be used in a script, limiting their usefulness considerably.

You have to use

Sector_SetRotation = 185,
Sector_SetCeilingOffset = 186,
Sector_SetFloorOffset = 187,
Sector_SetCeilingScale = 188,
Sector_SetFloorScale = 189,

to change alignment - all in a script. For 3D floors it must be done in the control sector but you have tp swap ceiling and floor for obvious reasons.
User avatar
Rex Claussen
Developer
Developer
Posts: 2659
Joined: Tue Jul 11, 2006 18:36
Contact:

Post by Rex Claussen »

Graf, I couldn't quite grasp what you were saying. It sounded like you were saying that Line_AlignFloor & Line_AlignCeiling need to be used in a script (but don't work), but then it also sounded like you said the other specials need to be used in a script.

Furthermore, what do those values represent (i.e., 185 - 189), and where are they inserted in the specials? Do I need to use all these specials to align flats? And will I need to play with the angles, etc. to see what works?

It would be great if you can provide an example. Thanks.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Yes, you need to use the specials i a script. But since the Line_* specials in some way need a reference line to work with they are a bit difficult to use. I never found a way to do it with them. The numbers are just the internal definitions because I was too lazy to edit them out.

Best look in the ZDoom Wiki for further information. If you need some maps as examples, there's a few uses in KDiZD.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Graf Zahl wrote:Sector_SetCeilingOffset = 186,
Sector_SetFloorOffset = 187,
Although Graf's name for those is actually a better description of what they do, you'll find them in the Wiki and zspecial.acs as Sector_SetCeilingPanning and Sector_SetFloorPanning.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Ugh. Please don't tell me that their internal names is different than their real name.

I remember being confused by this before and getting compiler errors. :(

Also there's Sector_SetFloor/CeilingScale2 specials which can be passed fixed point values for more precise scaling.
User avatar
Rex Claussen
Developer
Developer
Posts: 2659
Joined: Tue Jul 11, 2006 18:36
Contact:

Post by Rex Claussen »

I got it to work using Sector_SetCeilingPanning and Sector_SetFloorPanning. Thanks.
Locked

Return to “GZDoom”