public void TransferToNewOrbit(BaseOrbit newOrbit, bool force) { if (force) { transform.position = newOrbit.startLocation.transform.position; } // Transfer angle. var direction = (transform.position - newOrbit.transform.position) .normalized .WithY(0); _angle = Vector3.Angle(Vector3.forward, direction); // Translate the angle into 0 to 360 range. if (Vector3.Cross(Vector3.forward, direction).y > 0) { _angle = 360 - _angle; } // Reset input. ResetInputAxisHelpers(); UpdatePositionAndRotation(); }
private void RdoOrbit_CheckedChanged(object sender, EventArgs e) { LblBase.Text = BaseOrbit.ToString("c"); baseprice = BaseOrbit; }