public void EngineUI_view1_spokeRoller_onRoll(TouchRollerEventData ev) { float deg = ev.value * m_WheelModel_force_modifier * Mathf.PI * 2 * Mathf.Rad2Deg; m_wheel_nipples_GO[m_current_spoke].transform.localRotation = m_spoke_rolling_initial_nipple_rotation * Quaternion.AngleAxis(deg, -Vector3.forward); }
public void EngineUI_view1_spokeRoller_onRollStart(TouchRollerEventData ev) { if (m_wheel_angular_velocity != 0.0f) { ev.is_cancel_roll = true; return; } m_is_spoke_rolling = true; m_spoke_rolling_initial_nipple_rotation = m_wheel_nipples_GO[m_current_spoke].transform.localRotation; //m_WheelModel.get_nipple_rotate( m_selected_spoke ); }
public void EngineUI_view1_spokeRoller_onRollEnd(TouchRollerEventData ev) { m_is_spoke_rolling = false; m_wheel_nipples_GO[m_current_spoke].transform.localRotation = m_spoke_rolling_initial_nipple_rotation; if (ev.value > 0 && m_WheelModel.getSpokeForceKgf(m_current_spoke) > 200.0) { //overtight return; } m_WheelModel.nippleRotate(m_current_spoke, ev.value); m_WheelModel_compute_and_rebuild_mesh(); }