- Home /

# Finding the next point on a Bezier Curve with Vector3's

I'm creating a bouncing game where the objective is to catch a falling ball going from one point to another, I'm not using physics for the bouncing effect, instead of I'm using a bezier curve to simulate the angle.

The way it's getting calculated is I'm using four Vector3's. p0 through p3

p0 will be the balls current transform.position, easy enough (example: -2.5, 0, 0). p2 will be the **intercept** point, it is at this point where you're able to catch the ball, we know that as well. (2.5, 0, 0) p1 we can figure out because we're specifying a y, value, and the x value you will be the position between p0 and p2. ((2.5 + -2.5)/2, 2.5, 0) or (0, 2.5, 0)

But where I'm getting hung up is what the value of p3 should be. Again, we're setting a static y value, no issue there. But I can't figure out how to get **x**. I know that in this example it's going to be 5, because that's the next logical step, but I don't know the math to get 5. The point of this step is just to have the ball keep falling past the play area naturally

The ball's x position can be other values besides 2.5, sometimes the ball will bounce in place. (So p2 would also be (-2.5, 0, 0)) and I think that's throwing a wedge into the math I'm trying to figure out.

I've attached an image of what I'm trying to accomplish.

### Your answer

### Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.