示例#1
0
    void LateUpdate()
    {
        float speed = (transform.position - pos).magnitude / Time.deltaTime;

        profiler.Update(name + " speed", speed);
        if (isSimulationElement)
        {
            profiler.Update(name + " target speed", simElement.TargetSpeed);
            profiler.Update(name + " acceleration", simElement.TargetSpeed - prevSpeed);
            prevSpeed = simElement.TargetSpeed;
        }

        pos = transform.position;
    }
示例#2
0
 void LateUpdate()
 {
     if (bfController.isActive)
     {
         profiler.Update(bfController.GetName(), angle);
     }
 }
示例#3
0
    float GetRelativeRearWheelAngle(SmoothingMethod sMethod)
    {
        float newWheelAngle = bfWheelController.GetAbsoluteAngle();
        float ret           = MathUtils.GetSignedAngleDiff(newWheelAngle, oldWheelAngle);

        //- Debug

        profiler.Update("Raw", ret);
        profiler.Update("Mean", GetAverage());
        profiler.Update("Median", GetMedian());


        oldWheelAngle = newWheelAngle;

        if (sMethod == SmoothingMethod.None)
        {
            return(ret);
        }
        else
        {
            return(LowPass(ret, sMethod));
        }
    }
 void LateUpdate()
 {
     profiler.Update("notReadyCounter", notReadyCounter);
 }