#9866·carla

`ACarlaGameModeBase` spawns a sun on maps that already have one

Author: M-ColleyCreated Sep 3, 2026Updated Sep 3, 2026

Describe the bug

CARLA spawns and drives its own directional light. The actor is created by ACarlaGameModeBase::InitGame (not by set_weather, which merely steers the light that already exists). On CARLA's own towns that light is the lighting. On a level that already ships a complete lighting setup, CARLA adds a second sun, and the engine warns:

Multiple directional lights are competing to be the single one used for forward
shading, translucent, water or volumetric fog. Please adjust their
ForwardShadingPriority.

Every lit surface blows out to white, while surfaces in shadow stay correct — so it reads as a missing-texture bug rather than a lighting one.

Workaround: put CARLA's sun below the horizon (weather.sun_altitude_angle = -90) and let the level light itself.

A sun_enabled flag, or skipping the sun when the level already has a directional light, would make hosting external maps far less confusing.

Environment

  • CARLA ue58-dev-carla @ de3f38e64, running Epic's City Sample