Skip to content

feat: billboard target entity#948

Merged
robtfm merged 1 commit into
mainfrom
feat/billboard-target-entity
Jul 10, 2026
Merged

feat: billboard target entity#948
robtfm merged 1 commit into
mainfrom
feat/billboard-target-entity

Conversation

@robtfm

@robtfm robtfm commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Implements PBBillboard.target_entity (protocol#436). A billboard can now reorient to face a target scene entity instead of the camera.

Closes #946.

Behavior

  • Unset target_entity → faces the main camera (unchanged).
  • target_entity = camera reserved entity (2) → normalized to unset; faces the camera.
  • target_entity = another entity → faces that entity, resolved per-scene via RendererSceneContext::bevy_entity.
  • Target missing / deleted → reorientation is skipped so the entity keeps its last rotation, and resumes once the target exists again.

All three modes (BM_ALL, BM_Y, BM_YX) face the resolved target uniformly. For BM_ALL the roll now follows the target's Z roll (previously the camera's), matching the reference client and sdk7-test-scenes#73 station D.

Drive-by

Fixes a one-frame lag when facing the camera. update_billboards runs after CameraUpdate but before transform propagation, so the camera's GlobalTransform was a frame stale. Since the camera is a root entity, we now read its live local Transform.

Related: js-sdk-toolchain#1438, #1445, sdk7-test-scenes#73.

Implement PBBillboard.target_entity (protocol#436): a billboard can face a
target scene entity instead of the camera. Unset, or the camera reserved
entity (2), faces the camera as before; a missing or deleted target disables
reorientation until it exists again.

Drive-by fix a one-frame lag when facing the camera: the system runs after
CameraUpdate but before transform propagation, so read the camera's live local
Transform instead of its stale GlobalTransform (the camera is a root entity).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@robtfm robtfm merged commit 3c86b07 into main Jul 10, 2026
7 checks passed
@robtfm robtfm deleted the feat/billboard-target-entity branch July 10, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Billboard target entity (protocol#436)

1 participant