gmuGADIG / Fruit-Punch

Unity game developed by GADIG at GMU, Spring 2024.
4 stars 1 forks source link

Bug: Player shadow disappears while on platforms #188

Open BeafCultist opened 6 months ago

BeafCultist commented 6 months ago

When the player is on a platform, their shadow does not display at all. Additionally, when you jump while on the platform in level 1, the player's shadow will flicker briefly on the ground below the platform upon landing.

Justin1L8 commented 6 months ago

This is a known issue. The shadow uses the Projector component to project a dark spot below the object. When I made it, I severely over-estimated how useful this component was. It completely fails to render on TransparentCutout materials (which the inner-billboard shaders use), shadow overlap is additive, and it doesn't cast any light (so it would project through platforms. I patched around this by changing the max distance based on a ray-cast down). Fixing this properly would require replacing the shadows with a completely new system, and I doubt this will be able to be implemented in time. However, the flicker could probably be patched by changing the shadow script, and we could potentially give inner-billboards a property for if they're transparent?