void Update() { thisRigidbody.velocity = SoccerPhysics.ApplyPhysics(thisRigidbody.velocity, mass); if (isAiming) { if (nonPlayable) { SetAiming(false); return; } Vector3 mousePos = General.GetMousePosition(); float distance = Vector2.Distance(transform.position, mousePos); if (distance > padding) { selection.SetSelected(); } else { selection.SetCanceled(); } float ang = General.AngleBetweenPosition(transform.position, mousePos); transform.eulerAngles = new Vector3(0f, 0f, ang); } }
void Update() { thisRigidbody.velocity = SoccerPhysics.ApplyPhysics(thisRigidbody.velocity, mass); }