zaycev / bevy-magic-light-2d

Experiment with computing 2D shading, lighting and shadows with Bevy Engine
Apache License 2.0
427 stars 37 forks source link

fix: use global transform to compute lights #52

Closed luan closed 4 months ago

luan commented 5 months ago

This allows you to add a light source (or multiple) as a child of an entity and position it relatively using SpacialBundle or similar. This is useful for creating entities that are made up of multiple parts, such as a car with headlights, a character with an aura and a torch, etc, without having to manually position the light sources.

I tested this in my own project and with the krypta example.

trunk-io[bot] commented 5 months ago

Merging to main in this repository is managed by Trunk.