Consider the projectile to be something like a grenade with a parabolic trajectory. Wherever on the horizontal axis that the mouse click happens, the projectile is supposed to be thrown in that angle, and the vertical axis decides the height of the trajectory. The camera angle is locked.

Also, how to make the projectile rotate in the direction of the trajectory ?

Code I’m using to throw the projectile is as below:

	public GameObject grenade;
	public float throwPower = 100;

	void  Update (){
		if (Input.GetButtonDown("Fire1")) {
			GameObject clone; 
			clone = Instantiate(grenade, transform.position, transform.rotation); 
			clone.rigidbody.velocity = transform.TransformDirection(Vector3.for­ward * throwPower); 
		}
	}

though I get an error ** Unexpected symbol for', expecting identifier’** for the line

clone.rigidbody.velocity = transform.TransformDirection(Vector3.for­ward * throwPower);

The below is an example of various directions the projectile can be thrown in depending on where the mouse click happens.

Hello there C:, i would do a raycast then minus the hit point with your position to get the direction i will post a script as an example. Vector3 Dir = (hit.point - transform.position) may have to be Vector3 Dir = transform.position - hit.point) anyways enjoy!

    void Update () {
    			Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    			RaycastHit hit;
    			if (Physics.Raycast(ray, out hit, 100))
    				Debug.DrawLine(ray.origin, hit.point);
    		Vector3 Dir = (hit.point - transform.position);
    		transform.rigidbody.AddForce (Dir * 4);
    	}