コード例 #1
0
 public ChFunction_Setpoint(ChFunction_Setpoint other)
 {
     Y         = other.Y;
     Y_dx      = other.Y_dx;
     Y_dxdx    = other.Y_dxdx;
     last_x    = other.last_x;
     last_Y    = other.last_Y;
     last_Y_dx = other.last_Y_dx;
 }
コード例 #2
0
        // Update is called once per frame
        void Update()
        {
            float maxAngle = Mathf.Abs(Mathf.Lerp(lowSpeedAngle, highSpeedAngle, (float)m_chassis.BodyFrame.GetPos_dt().Length() / crossoverSpeed));

            targetAngle = maxAngle * Input.GetAxis("Horizontal");
            angle       = Mathf.MoveTowards(angle, targetAngle, degreesPerSecondLimit * Time.fixedDeltaTime);

            ChFunction_Setpoint fun = (m_revolute.GetAngleFunction() as ChFunction_Setpoint);

            fun.SetSetpoint(maxAngle * angle, ChSystem.system.GetChTime());
        }