private PushSloth ( Vector3 force ) : IEnumerator | ||
force | Vector3 | |
Результат | IEnumerator |
IEnumerator PushSloth(Vector3 force) {
yield return null;
for (float i = 0f; i < 1f; i += Time.deltaTime / PULLFORCETIME) {
if (_controlsDisabled || _ragdollToggle.ragdolled) break;
_rigidBody.AddForce(force*Time.deltaTime, ForceMode.Acceleration);
yield return null;
}
//_rigidBody.AddRelativeForce(force, ForceMode.Impulse);
}