forked from 1b-agent/opencadstudio-upstream
Make TORIENT view-aware and fix DYN angle commit
This commit is contained in:
1 parent
1e7bd1e9b2
commit
7fc8c5985b
2 files changed
+31
-15
No files matched your search
+4
-1
@@ -1140,7 +1140,10 @@ impl OpenCADStudio {
|
||||
.iter()
|
||||
.filter_map(|&h| self.tabs[i].scene.document.get_entity(h).cloned().map(|e| (h, e)))
|
||||
.collect();
|
||||
let new_cmd = TorientCommand::new(handles, entities);
|
||||
let cam_rot = self.tabs[i].scene.camera.borrow().rotation;
|
||||
let right = cam_rot * glam::Vec3::X;
|
||||
let view_twist = right.y.atan2(right.x) as f64;
|
||||
let new_cmd = TorientCommand::new(handles, entities, view_twist);
|
||||
self.command_line.push_info(&new_cmd.prompt());
|
||||
self.tabs[i].active_cmd = Some(Box::new(new_cmd));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user