-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Line 600 in 59feeef
// TODO: refactor, do we really need to despawn the editor camera on settings change? |
return;
}
// TODO: refactor, do we really need to despawn the editor camera on settings change?
let (
focus,
radius,
yaw,
pitch,
) = if let Some(existing_editor_cam) = existing_editor_cam {
(
existing_editor_cam.focus,
existing_editor_cam.radius,
existing_editor_cam.yaw,
existing_editor_cam.pitch,
)
} else {
let radius = match args.scene_type {
ZeroverseSceneType::Room | ZeroverseSceneType::SemanticRoom => (
match room_settings.room_size {
ScaleSampler::Bounded(_min, max) => max.max_element(),
ScaleSampler::Exact(size) => size.max_element(),
}) * 2.0,
_ => 3.5,
}.into();
let yaw = match args.scene_type {
ZeroverseSceneType::Room | ZeroverseSceneType::SemanticRoom => 0.8,
_ => 0.0,
}.into();
let pitch = match args.scene_type {
ZeroverseSceneType::Room | ZeroverseSceneType::SemanticRoom => 0.8,
_ => 0.0,
}.into();
(
Vec3::ZERO.into(),
radius,
yaw,
pitch,
)
};
// TODO: refactor material grid reset, don't spawn editor camera outside viewer feature
commands.spawn((
EditorCameraMarker::default(),
PanOrbitCamera {
focus,
radius,
pitch,
yaw,
allow_upside_down: true,
orbit_smoothness: args.orbit_smoothness,
pan_smoothness: args.pan_smoothness,