Run relative_cursor_position example spawning the Camera2d with a Camera bundle.
commands.spawn((
Camera2d,
Camera {
// Cursor position will take the viewport offset into account
viewport: Some(Viewport {
physical_position: [200, 100].into(),
physical_size: [600, 600].into(),
..default()
}),
..default()
},
));
Bevy version
0.15-dev
What you did
Run
relative_cursor_position
example spawning theCamera2d
with aCamera
bundle.What went wrong
Crashes as you see in #15661
Additional information
This is fixed by changing the bundle:
It should be possible to spawn the
Camera2d
with aCamera
bundle.