remove XrCameraBundle, use required components and component hooks instead
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
@@ -11,7 +11,7 @@ use bevy::{
|
||||
transform::TransformSystem,
|
||||
};
|
||||
use bevy_mod_xr::{
|
||||
camera::{XrCamera, XrCameraBundle, XrProjection},
|
||||
camera::{XrCamera, XrProjection},
|
||||
session::{
|
||||
XrFirst, XrHandleEvents, XrPreDestroySession, XrRenderSet, XrRootTransform, XrTrackingRoot,
|
||||
},
|
||||
@@ -147,20 +147,17 @@ pub fn init_views(
|
||||
let temp_tex = swapchain_images.first().unwrap();
|
||||
// this for loop is to easily add support for quad or mono views in the future.
|
||||
for index in 0..2 {
|
||||
info!("{}", graphics_info.resolution);
|
||||
info!("XrCamera resolution: {}", graphics_info.resolution);
|
||||
let view_handle =
|
||||
add_texture_view(&mut manual_texture_views, temp_tex, &graphics_info, index);
|
||||
let cam = commands
|
||||
.spawn(
|
||||
(XrCameraBundle {
|
||||
camera: Camera {
|
||||
target: RenderTarget::TextureView(view_handle),
|
||||
..Default::default()
|
||||
},
|
||||
view: XrCamera(index),
|
||||
.spawn((
|
||||
Camera {
|
||||
target: RenderTarget::TextureView(view_handle),
|
||||
..Default::default()
|
||||
}),
|
||||
)
|
||||
},
|
||||
XrCamera(index),
|
||||
))
|
||||
.remove::<Projection>()
|
||||
.id();
|
||||
match root.get_single() {
|
||||
|
||||
Reference in New Issue
Block a user