Skip to content

Bevy City traffic lights#23706

Open
nuts-rice wants to merge 10 commits into
bevyengine:mainfrom
nuts-rice:traffic_lights
Open

Bevy City traffic lights#23706
nuts-rice wants to merge 10 commits into
bevyengine:mainfrom
nuts-rice:traffic_lights

Conversation

@nuts-rice
Copy link
Copy Markdown
Contributor

Objective

Solution

  • Added traffic light asset (let me know if this should be added to the bevy_city asset repo or what)
  • Code for spawning them (still WIP on the rotation and position)

Testing

  • Still WIP
  • Runs with traffic light asset
  • The traffic light asset could use some work on material as well as light bulb material and possibly the code for that

@IceSentry
Copy link
Copy Markdown
Contributor

For the light model, I would suggest using the light-square from kenney's road city kit. We already have it in our asset files too so it's really easy to import it as a web asset https://github.com/bevyengine/bevy_asset_files/blob/main/kenney/city-kit-roads/light-square.glb

@nuts-rice nuts-rice marked this pull request as ready for review April 10, 2026 14:17
@kfc35 kfc35 added A-Rendering Drawing game state to the screen C-Examples An addition or correction to our examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 11, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering Apr 11, 2026
@kfc35 kfc35 added the A-ECS Entities, components, systems, and events label Apr 11, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in ECS Apr 11, 2026
),

(
checkbox()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is messed up here. This should use :FeathersCheckbox.

),
(
:FeathersCheckbox {
@caption: {bsn! { Text("Shadow maps enabled") ThemedText }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it is right now, this should be labeled "Traffic lights" and the Text child needs to go.

on(checkbox_self_update)
on(|change: On<ValueChange<bool>>, mut settings: ResMut<Settings>, mut traffic_light: Query<&mut Visibility, With<TrafficLight>>| {
settings.traffic_lights = change.value;
let vis = if change.value {Visibility::Inherited} else {Visibility::Hidden};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the formatting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ECS Entities, components, systems, and events A-Rendering Drawing game state to the screen C-Examples An addition or correction to our examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Needs SME Triage
Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

4 participants