mirror of https://github.com/wayvr-org/wayvr.git
make other `shift_world` obey `space_drag_affects_world`, and overlays follow `space-rotate`
This commit is contained in:
parent
44b7a2a6ab
commit
67877d6a5f
|
|
@ -95,7 +95,11 @@ impl PlayspaceMover {
|
|||
* -1.0;
|
||||
space_transform.translation = offset;
|
||||
|
||||
let before_pose = data.pose;
|
||||
data.pose *= space_transform;
|
||||
if !app.session.config.space_drag_affects_world {
|
||||
playspace_common::shift_world(overlays, &mut app.anchor, &before_pose, &data.pose);
|
||||
}
|
||||
data.hand_pose = new_hand;
|
||||
|
||||
if self.universe == ETrackingUniverseOrigin::TrackingUniverseStanding {
|
||||
|
|
@ -243,7 +247,9 @@ impl PlayspaceMover {
|
|||
set_working_copy(&self.universe, chaperone_mgr, &mat);
|
||||
chaperone_mgr.commit_working_copy(EChaperoneConfigFile::EChaperoneConfigFile_Live);
|
||||
|
||||
playspace_common::shift_world(overlays, anchor, &before, &mat);
|
||||
if !app.session.config.space_drag_affects_world {
|
||||
playspace_common::shift_world(overlays, anchor, &before, &mat);
|
||||
}
|
||||
|
||||
if self.drag.is_some() {
|
||||
log::info!("Space drag interrupted by fix floor");
|
||||
|
|
@ -314,7 +320,9 @@ impl PlayspaceMover {
|
|||
set_working_copy(&self.universe, chaperone_mgr, &new_mat);
|
||||
chaperone_mgr.commit_working_copy(EChaperoneConfigFile::EChaperoneConfigFile_Live);
|
||||
|
||||
playspace_common::shift_world(overlays, anchor, &before, &new_mat);
|
||||
if !app.session.config.space_drag_affects_world {
|
||||
playspace_common::shift_world(overlays, anchor, &before, &new_mat);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn playspace_changed(
|
||||
|
|
|
|||
|
|
@ -114,7 +114,11 @@ impl PlayspaceMover {
|
|||
|
||||
space_transform.translation = offset;
|
||||
|
||||
let before_pose = data.pose;
|
||||
data.pose *= space_transform;
|
||||
if !app.session.config.space_drag_affects_world {
|
||||
playspace_common::shift_world(overlays, &mut app.anchor, &before_pose, &data.pose);
|
||||
}
|
||||
data.hand_pose = new_hand;
|
||||
|
||||
apply_offset(data.pose, &mut monado.ipc);
|
||||
|
|
@ -228,7 +232,9 @@ impl PlayspaceMover {
|
|||
let after_pose = Affine3A::from_translation(res.playspace_pos.into());
|
||||
apply_offset(after_pose, &mut monado.ipc);
|
||||
|
||||
playspace_common::shift_world(overlays, &mut app.anchor, &before_pose, &after_pose);
|
||||
if !app.session.config.space_drag_affects_world {
|
||||
playspace_common::shift_world(overlays, &mut app.anchor, &before_pose, &after_pose);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -300,9 +306,11 @@ impl PlayspaceMover {
|
|||
|
||||
self.gravity.reset();
|
||||
|
||||
let after =
|
||||
Affine3A::from_rotation_translation(pose.orientation.into(), pose.position.into());
|
||||
playspace_common::shift_world(overlays, anchor, &before, &after);
|
||||
if !app.session.config.space_drag_affects_world {
|
||||
let after =
|
||||
Affine3A::from_rotation_translation(pose.orientation.into(), pose.position.into());
|
||||
playspace_common::shift_world(overlays, anchor, &before, &after);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn reset_offset(
|
||||
|
|
@ -391,7 +399,10 @@ impl PlayspaceMover {
|
|||
|
||||
let after =
|
||||
Affine3A::from_rotation_translation(pose.orientation.into(), pose.position.into());
|
||||
playspace_common::shift_world(overlays, anchor, &before, &after);
|
||||
|
||||
if !app.session.config.space_drag_affects_world {
|
||||
playspace_common::shift_world(overlays, anchor, &before, &after);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn save_center(&mut self, monado: &mut Monado) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue