Skip to content

Lack of documentation for OrthographicProjection #5818

@CalinZBaenen

Description

@CalinZBaenen

How can Bevy's documentation be improved?

Add documentation for OrthographicProjection.
As mentioned in my Discord message there is no official documentation for OrthographicProjection, even in projection.rs, the first place I looked.

Why the documentation is "not correct".

OrthographicProjection is in bevy::render::camera and has no documentation.
For example I use this YouTube video for reference, and when copying the camera system they use at 05:50, I want to actually understand what the following code does:

cam.orthographic_projection.bottom = -1.;
cam.orthographic_projection.right  = 1.;
cam.orthographic_projection.left   = -1. * RESOLUTION;
cam.orthographic_projection.top    = 1. * RESOLUTION;

// I know what N * RESOLUTION does, but what do the numbers (for `projection.{direction}`) mean?

Suggestions for the new documentation.

I feel like the added documentation should discuss what OrthographicProjection is, how it is used, what its properties do, and provide some examples of how to use it.
Pretty standard, I know, but some people may say "BuT tHis TyPe DoEsN't NeED DocUMeNtATiOn B-BECauSe".

Help me.

On a side note, if we dig deeper into scaling_mode we see the term "world unit" but the documentation doesn't make it clear what that term is defined as.
If you'd like to help explain to me what any of these are so I can make my game in peace, knowing exactly what everything is doing, check out the Discord thread I made for it in the Bevy guild.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-DocsAn addition or correction to our documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions