BACKGROUND: I’m trying to create a game where cat jumps from platform to platform, but as any other cat this furry devil won’t do the things I’m asking for. I want the cat to jump and land at the specific spot but I don’t know how to do it.
PROBLEM: I know cats coordinates $(X_c,Y_c)$ and the target spot coordinates $(X_t,Y_t)$. The target spot is always further along the $X$-axis but it can be placed lower or higher than the cat. Whenever the cat jumps and is in the air his velocity along $X$ is constant ($V_x$) and there’s gravity affecting him ($G$). How can I calculate the right starting velocity along the $Y$-axis ($V_y$) so the cat can reach $(X_t,Y_t)$?
Hint:
$$x(t) = x(0) + v_x(0)t \\ y(t) = y(0) + v_y(0)t - 0.5 gt^2,$$
where $x(t),y(t)$ are positions as functions of time $t$, $v_x(t), v_y(t)$ are the components of velocity, and $g$ is the acceleration due to gravity. Assumption is that $x$ is positive to the right, and $y$ is positive up.