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; }
void LateUpdate() { if (bfController.isActive) { profiler.Update(bfController.GetName(), angle); } }
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); }