Shooting like a catapult

Hi guys, some friends and I we are producing a tactical RPG . One of the characters acts like a catapult. For instance, where the player clicks in the games’ grid, this character shoots a bullet in the tile which was clicked, in a parable movement. However it’s not working.

I’ve already tried something like this, but the bullet just goes spinning in a straight line. Here’s the code:

/right click to shoot
        if (Input.GetMouseButtonDown(1))
        {
            //raycast checks and returns an object, if it's a tile, the unit shoots
            Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
            RaycastHit hit;

            if (Physics.Raycast(ray, out hit))
            {
                //checks if the tile is available based on the line and column of the unit
                Tile tileAux = hit.transform.gameObject.GetComponent<Tile>();
                Jogador scriptJog = player.GetComponent<Jogador>();

                if (tileAux.TilePostion.x == scriptJog.GridPosition.x || tileAux.TilePostion.y == scriptJog.GridPosition.y)
                {
                    if (tileAux.TilePostion.x > scriptJog.GridPosition.x)
                        tileAux.TilePostion.x = 5;
                    else
                        tileAux.TilePostion.x = 0;

                    if (tileAux.TilePostion.y > scriptJog.GridPosition.y)
                        tileAux.TilePostion.y = 5;
                    else
                        tileAux.TilePostion.y = 0;

    //instantiates the bullet
         GameObject Shooting = Instantiate(projectile, SpawBullet.transform.position, SpawBullet.transform.rotation);
                        Rigidbody BulletRigid = Shooting.GetComponent<Rigidbody>();
    
                        if (SpawBullet.tag == "Bala1" && gameManager.playerTurn == 1)
                        {
                            BulletRigid.velocity = SpawBullet.transform.forward * BulletVelocity * Time.deltaTime;
                            BulletRigid.angularVelocity = SpawBullet.transform.right *   
BulletRotarionSpeed*Time.deltaTime;
   
                        }

I’ve been working on this for one week and I can’t find a solution. How could I solve this?

Here is a script that does arcing. You attack it to a projectile and then call the function:

	public class BulletArc : MonoBehaviour {
		
		bool IsMoving { get; set; } = false;
		Vector3 StartPos { get; set; }
		Vector3 EndPos  { get; set; }
		Vector3 Direction { get; set; }
		float Magnitude { get; set; }
		float ArcFactor { get; set; }
		float Step { get; set; };
		float StepSize { get; set; }
		float TotalSteps { get; set; }
		
		public void FireOnPath (
			Vector3 startPos, 
			Vector3 endPos, 
			float arcFactor = 1,
			float steps = 100){
			
			StartPos = startPos;
			EndPos = endPos;
			
			var dif = endPos - startPos;
			Direction = dif.normalized;
			Magnitude = dif.magnitude;
			
			Step = 0;
			TotalSteps = steps;
			StepSize = Mathf.Pi / steps;
			ArcFactor = arcFactor;
			
			transform.position = StartPos
			IsMoving = true;
		}
		
		void Update () {
			if (IsMoving){
				Step++;
				
				var completion = Mathf.Sin (Mathf.Pi * StepSize * Step);
				var dirVec = Direction * completion * Magnitude;
				var height = ArcFactor * completion * Magnitude;
				
				var newPos = new Vector3 (dirVec.x,height, dirVec.z);
				
				transform.position= newPos;
				
				
				if (Step == TotalSteps)
				IsMoving = false;
			}
		}
	}