private void Update() { if (jointAndPointControlls == null) { return; } if (delayTime - Time.deltaTime > 0) { delayTime -= Time.deltaTime; return; } else if ((delayTime > 0 && delayTime - Time.deltaTime < 0) || isResetPoint) { delayTime -= Time.deltaTime; isResetPoint = false; RestorePoint(); return; } deltaTime += 0.0166f;//OYM:用time.deltaTime并不理想,或许是我笔记本太烂的缘故? scale = transform.lossyScale.x; addForce += ADBWindZone.getaddForceForce(transform.position) * windForceScale * deltaTime; UpdateDataPakage(); //OYM:理论上你多执行几次UpdateDataPakage()也没啥关系 }
private void Update() { if (jointAndPointControlls == null) { return; } deltaTime = Mathf.Lerp(deltaTime, Time.deltaTime, 1 / (bufferTime * 60)); if (isResetPoint) { isResetPoint = false; RestorePoint(); return; } // deltaTime =Mathf.Lerp(deltaTime, Mathf.Min(Time.deltaTime,0.0166f),0.1f);//OYM:用time.deltaTime并不理想,或许是我笔记本太烂的缘故? scale = transform.lossyScale.x; addForce += ADBWindZone.getaddForceForce(transform.position) * windForceScale * deltaTime; UpdateDataPakage(); //OYM:理论上你多执行几次UpdateDataPakage()也没啥关系 }