public override float QueryAngularVelocity(float inputAngularVelocity, float dt) { angularVelocity = inputAngularVelocity; if (_outputAIsNull || _outputBIsNull) { #if NVP_DEBUG_PT if (Powertrain.DEBUG) { Debug.Log($"{name} (QueryAngularVelocity)\tReturn W = {inputAngularVelocity}"); } #endif return(inputAngularVelocity); } float Wa = outputA.QueryAngularVelocity(inputAngularVelocity, dt); float Wb = outputB.QueryAngularVelocity(inputAngularVelocity, dt); float W = (Wa + Wb) * 0.5f; #if NVP_DEBUG_PT if (Powertrain.DEBUG) { Debug.Log($"{name} (QueryAngularVelocity)\tWa = {Wa}\tWb = {Wb}\tReturn W = {inputAngularVelocity}"); } #endif return(W); }
public virtual float QueryAngularVelocity(float inputAngularVelocity, float dt) { angularVelocity = inputAngularVelocity; if (_outputAIsNull) { return(0); } float Wa = outputA.QueryAngularVelocity(inputAngularVelocity, dt); return(Wa); }