Lights and Shadows
Add a Light Emitter to an Object when a light needs its own position and Logic. A moving lantern can have a Sprite and a separate emitter; changing the Sprite’s local size doesn’t change the emitter’s range.
Prerequisites
Prepare a visible 2D or 3D Scene. Use a world-space Object with Transform and add Light Emitter in the component toolbox. Screen UI isn’t a world-light target. In 2D, enable Scene lighting for the check.
Configure One Light
- Choose Point for light in every direction or Spot for a cone. In 2D, Sun gives directional light. A 3D Scene has its own Scene sun; its Object emitters are Point and Spot.
- Set Enabled, Color, Intensity, Range, and the emitter’s local position. World distances in the current engine are metres.
- For Spot, set rotation and Cone Angle. Compare the direction with the emitter’s marker and the illuminated geometry.
- Set shadow participation on the light and on the Object that should cast. Begin with one caster and one receiving surface.
- Run the Scene and compare enabled/disabled states. Save and reopen before adding more lights.
Light Emitters are repeatable components. Target the intended named component when changing a property through Logic. Animate Light Emitter changes a numeric or color property over time; a direct assignment cancels the transition for that property.
Scene Environment and Casting
In 3D, Scene ambient light, sun, environment map, fog, and other atmosphere controls affect the whole view. Set these before diagnosing one dark Material. A metallic surface also depends on its environment response.
Object shadow modes select the supported casting representation. Imported Models can use Capsule Shadows as a Model-owned proxy. A capsule shadow proxy is separate from physical collision. Check the selected backend and Scene budgets; stored light state can remain valid even when the renderer doesn’t admit every light or shadow.
Time of Day can leave an emitter always on, activate it at night or between hours, or vary it with darkness. This needs a running atmosphere clock. In 3D, baked lighting retains the sky and bounce captured at bake time, while the sun’s direct light can still change. Compare the actual times of day used by the game.
Expected result: the test light affects the intended world geometry, its shadow responds to the chosen caster, and Logic changes the correct emitter. Check a fresh run and an exported game on the target GPU/browser.
Troubleshooting
If no light appears, inspect Scene lighting, emitter Enabled, intensity, range, position, and world presentation. If a Spot points away, inspect local rotation and positioning bindings. If a shadow is absent, check light shadows, Object casting mode, compatible proxy, backend, and budget.
If shadows are noisy or too expensive, test one light/caster, adjust the supported precision/distance controls, and measure frame time before raising budgets. See Light Emitter reference, Materials, and rendering settings.
Myth Engine Documentation
