# how to jump & land 2 objects with different positions in same point

hi all.

im recently working on 2D game.

lets say this way .
i have 2 players in different x and y positions.
both of them jump with same function at almost same time(player 1 little early).

how can i edit the jump velocity of player2 to landing on same position as player 1 .

we dont know the target point .
it depends on player1 jump velocity and position.
i figure that at first im need to when player1 jumped Instantly calculate the land point of player1 and then decrease or incearse jumpforce of player2.

but question is how calculate ??

this is my code for jump:
private float xVelocityForce=9f, yVelocityForce=9f;
GetComponent().velocity = new Vector2(xVelocityForce, yVelocityForce);

You can maybe use a speed variable and multiply the force with the speed.
Do something like:

``````float speedDecreaser = 2f;

float relativeSpeed = Vector2.Distance(transform.position, targetPoint.position) / speedDecreaser;

xVelocityForce = 9f * relativeSpeed;
``````

thanks.
but unfortunately we dont know the targetpoint.
both players jump at almost same time(player1 little early).
i figure that at first im need to when player1 jumped Instantly calculate the land point of player1 and then decrease or incearse jumpforce of player2.

but question is how calculate ??