Skip to content

Commit

Permalink
Doc custom CameraProjection requires use of plugin (#13140)
Browse files Browse the repository at this point in the history
# Objective

Documentation should mention the two plugins required for your custom
`CameraProjection` to work.

## Solution

Documented!

---

I tried linking to `bevy_pbr::PbrProjectionPlugin` from
`bevy_render::camera::CameraProjection` but it wasn't in scope. Is there
a trick to it?
  • Loading branch information
Zoomulator authored May 5, 2024
1 parent ba33672 commit d1099ac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/bevy_render/src/camera/projection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ pub struct CameraUpdateSystem;
/// to recompute the camera projection matrix of the [`Camera`] component attached to
/// the same entity as the component implementing this trait.
///
/// Use the plugins [`CameraProjectionPlugin`] and `bevy::pbr::PbrProjectionPlugin` to setup the
/// systems for your [`CameraProjection`] implementation.
///
/// [`Camera`]: crate::camera::Camera
pub trait CameraProjection {
fn get_projection_matrix(&self) -> Mat4;
Expand Down

0 comments on commit d1099ac

Please sign in to comment.