// Update is called once per frame void Update() { if (Input.GetKeyDown("space") && !hitLog) { rb.AddForce(castForce, ForceMode2D.Impulse); rb.gravityScale = 1; game.Cast(); } }