public bool RotToOrigin()
{
Vector3 tmpTGT = OrigRef;
Vector2 target = new Vector2(tmpTGT.x, tmpTGT.y);
float angle = Mathf.Deg2Rad * Vector2.Angle(Vector2.up, target);
if (angle == 0) return true;
angle = Mathf.Clamp(increment * TimeWarp.deltaTime, 0, angle);
if (target.x > 0)
angle = -angle;
if (!fullcircle)
{
target = new Vector2(tmpTGT.x, tmpTGT.y);
float angleRef = Mathf.Deg2Rad * Vector2.Angle(Vector2.up, target);
if (target.x > 0)
{
angleRef = -angleRef;
}
angle = Mathf.Clamp(angle, angleRef - angleMinus, angleRef + anglePlus);
if (angle != 0)
pivot.RotateAround(pivot.forward, angle);
}
else
pivot.RotateAround(pivot.forward, angle);
return false;
}