Beispiel #1
0
    void Update()
    {
        if (!sv.Ready())
        {
            return;
        }

        float grip =
            (sv.vehicleAnalyzeData.front_grip +
             sv.vehicleAnalyzeData.rear_grip) * 0.5f;

        sv.AccelerateVehicle(
            accel * sv.vehicleParameter.accel_factor * grip +
            accel.magnitude * liftUp);

        sv.Rotate(GetBalanceRotation());
        // sv.Rotate(GetTurningRotation());
    }