diff --git a/app-proto/src/display.rs b/app-proto/src/display.rs index 7e1d3a7..184b29e 100644 --- a/app-proto/src/display.rs +++ b/app-proto/src/display.rs @@ -318,16 +318,16 @@ pub fn Display() -> View { let rep = state.assembly.elements.with_untracked( |elts| elts[sel].representation.get_clone_untracked() ); - let vel_field_z = DMatrix::from_column_slice(5, 5, &[ - 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0, 0.0, + let vel_field_x = DMatrix::from_column_slice(5, 5, &[ 0.0, 0.0, 0.0, 0.0, 1.0, - 0.0, 0.0, 2.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, + 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]); let translate_x = translate_pos_x_val - translate_neg_x_val; if translate_x != 0.0 { - let vel = translate_x * vel_field_z * rep; + let vel = translate_x * vel_field_x * rep; let elt_motion: DVector = time_step * TRANSLATION_SPEED * vel; assembly_for_raf.deform(vec![(sel, elt_motion.as_view())]); scene_changed.set(true);