Camera examples
The engine's camera examples: what each one shows, whether it runs in a browser and the command that runs it.
Camera projections, viewports, controllers and following a target. There are 9 examples on this page. For the concepts behind them, see Cameras.
Run any of them from the engine core's workspace (the folder of the engine source that holds the neo crate's Cargo.toml); see Run an example.
Examples#
| Example | What it shows | Web | Run |
|---|---|---|---|
| 2D on NEO UI | Shows how to render 2D objects on top of NEO UI | Yes | cargo run --example 2d_on_ui |
| 2D top-down camera | A 2D top-down camera smoothly following player movements | Yes | cargo run --example 2d_top_down_camera |
| Camera Orbit | Shows how to orbit a static scene using pitch, yaw, and roll. | Yes | cargo run --example camera_orbit |
| Custom Projection | Shows how to create custom camera projections. | Yes | cargo run --example custom_projection |
| First person view model | A first-person camera that uses a world model and a view model with different field of views (FOV) | Yes | cargo run --example first_person_view_model |
| Free Camera controller | Demonstrates the FreeCamera controller for 3D scenes. | Yes | cargo run --example free_camera_controller --features free_camera |
| Pan Camera | Example Pan-Camera Styled Camera Controller for 2D scenes | Yes | cargo run --example pan_camera_controller --features pan_camera |
| Projection Zoom | Shows how to zoom orthographic and perspective projection cameras. | Yes | cargo run --example projection_zoom |
| Screen Shake | A simple 2D screen shake effect | Yes | cargo run --example 2d_screen_shake |