OpenRA / OpenRA

Open Source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert written in C# using SDL and OpenGL. Runs on Windows, Linux, *BSD and Mac OS X.
https://www.openra.net
GNU General Public License v3.0
14.58k stars 2.65k forks source link

Change how voxel aircraft shadows decide when to "tilt" #20739

Open penev92 opened 1 year ago

penev92 commented 1 year ago

Since we have voxel actor tilting on slopes, shadows have been trying to match them. This also holds true for aircraft, which don't tilt on slopes, but their shadows try to. The problem is shadows don't fall directly downwards and there are visible issues even with the slight offset in TS. Mods with a bigger offset would likely look worse. ts_aircraft_tilting_shadows

Shadows should be "tilting" based on their own position on the ground rather than the aircraft's projected position.

The gif above also shows slopes have a negative impact on the shadow offset.

image

PunkPun commented 1 year ago

Shadows are also incorrectly defined for non-tilting vehicles, such as titan