How do I predetermine the trajectory end point or sigle point of trajectory like in this 1 ?

Picture is in 2d space, but i want to predetermine X,Y and Z

How do I predetermine the trajectory end point or sigle point of trajectory like in this 1 ?

Picture is in 2d space, but i want to predetermine X,Y and Z

The physics behind it isn’t too hard. The simplest way to do it would be to do a simple parametric equation. Given you know the launch direction and magnitude, you can find the projectiles position as a simple function of time:

```
Vector3 launchVelocity;
Vector3 launchPos;
public float gravity;
public Vector3 ObjectPos {
get {
float yPos = launchVelocity.y * time - .5f * gravity * time * time + launchPos.y;
//height of an object as a function of time (ignoring air resistance)
// h(t) = vi * t + .5g*t^2 + startHeight
var xzPos = new Vector3(launchPos.x , 0 , launchPos.z) + new Vector3(launchPos.x , 0 , launchPos.z) * time;
//horizontal velocity is unaffected by time or vertical height.
//So just: startPos + vi*t
return yPos + xzPos;
}
}
```

This will give you the position of your object at any time after launch. To figure out when it lands, just figure out when the height is equal to the round height. If you have level ground, this will happen at t = 2 * (yVel / gravity). And obviously, this isn’t working code, the ideas are all there with some stuff written in code format, but its mostly just written to get all the ideas across.