void Update() { if (!hasControl || isDead) { return; } float horizontal = GlobalControl.GetHorizontal(playerNum); float vertical = GlobalControl.GetVertical(playerNum); rigid2d.velocity = new Vector2(horizontal, vertical).normalized *speed; float horizontalAim = GlobalControl.GetHorizontalAim(playerNum); float verticalAim = GlobalControl.GetVerticalAim(playerNum); if (horizontalAim != 0f || verticalAim != 0f) { transform.up = new Vector3(horizontalAim + 0.01f, verticalAim, 0); } if (GlobalControl.GetButtonDownRT(playerNum)) { ThrowBoomerang(); } }