I want to make my character jump by drawing lines.

But while my code is going towards the x-axis direction in 2D, when I switch to 3D, it always turns upwards regardless of the direction of the line. There is no change in the X-axis. My code is as follows:

```cs
if (other.gameObject.CompareTag("Line"))
{
    rb.AddForce(Vector3.up * speed * Time.deltaTime, ForceMode.Impulse);
    / / Destroy(other.gameObject);
}

```

Could someone suggest how to correct my code?