# What is the parabolic formula for a 2D projectile's trajectory

I have a little jumping game where the heigh of the jump varies, so to make the game easier, I want to display the trajectory of the jump. To display it I decided to make a while loop that updates a Line Renderer's vertices, given a resolution int of how many vertices I want.

The only problem now is that I don't know how to get the projectile's trajectory as a function/equation. I will have a constant x velocity, and at the beginning of a jump I add a certain upwards-force. I've only been able to find one potentially useful equation, but it requires a force magnitude and an angle.

**Answer** by elenzil
·
Sep 07, 2016 at 06:34 PM

at the beginning of the jump, figure out the vertical velocity.

then this is the y_position as a function of x_position:

```
// gravity_constant is typically 9.8
t = x_position / x_velocity.
y_position = y_original + t * y_velocity - (t * t * gravity_constant / 2.0).
```

### 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.

### Follow this Question

### Related Questions

2D kinematics 1 Answer

In what way do units matter when providing density for Collider2Ds? 0 Answers

Good Solution to Physics Based Gameplay 1 Answer

Trajectory of a Ball 1 Answer

Failed to achieve uniform circle movement with rigidbody2D. 0 Answers