Launching a player in a certain direction - C#

I am trying to create a boost pad that when the player enters they will be launched into the air. I have created the basic effect of launching the player into the air, but I also want to have it so when the players is launched, they are also launched forward in the direction of another platform without the player having to guide themselves to the other platform.

Here is my code right now.

    using UnityEngine;
    using System.Collections;
    
    public class Boost_pad : MonoBehaviour {
    
    	public float velocity = 10.0f;
    	public float force = 20.0f;
    	
    	// Use this for initialization
    	void Start () {
    		
    	}
    	
    	// Update is called once per frame
    	void Update () {
    		
    	}
    	
    	void OnTriggerEnter(Collider c)
    	{
    		if (c.tag == "Player")
    		{
    			c.rigidbody.velocity = Vector3.up * velocity;
    		}
    	}
    	
    	void OnTriggerExit(Collider c)
    	{
    		if (c.tag == "Player")
    		{
    			c.rigidbody.AddForce(Vector3.forward * force, ForceMode.Acceleration);
    		}
    	}
    }

Is your OnTriggerExit() event happening?

In either case, you’re using Vector3.forward which is static and unchanging and always along the +Z axis. So if you’re doing a side scroller moving along the +X axis, or some variation thereof, this won’t work. You just need to change Vector3.forward to Vector3.right or -Vector3.right if you’re moving along the -X axis. If it’s in 3D, you need to compute the normalized direction cosine from the player to the next platform. In other words:

Vector3 dir = (platformposition - playerposition).normalized();

And use that instead of Vector3.forward.

You can also zero out the Y component of the dir vector to make the player move along the bearing toward the platform without them moving up/down:

Vector3 dir = platformposition - playerposition;
dir.Y = 0;
dir.Normalize();