snap now works when creating as well
This commit is contained in:
parent
f76cab4129
commit
2a1614b004
|
@ -13,10 +13,12 @@ pub fn create_sys(
|
|||
q_cam: Query<(&Camera, &GlobalTransform), With<MainCamera>>,
|
||||
mut paths: Query<&mut Path>,
|
||||
mut transforms: Query<&mut Transform>,
|
||||
snap: Res<SnapGrid>,
|
||||
) {
|
||||
let mouse_pos = get_mouse_pos(&q_cam, &wnds);
|
||||
|
||||
if let Some(mouse_pos) = mouse_pos {
|
||||
let mouse_pos = snap.snap_to_grid(mouse_pos);
|
||||
|
||||
if let Some(sd) = &mut *first_point {
|
||||
update_main_shape_creation(&mut paths, &transforms, sd, mouse_pos);
|
||||
|
|
Loading…
Reference in a new issue