I'm trying to make Object2 to hit Object1.
$x_1$ X coordinate for Object1 after time t has passed
$y_1$ Y coordinate for Object1 after time t has passed
$a_{1x}$ Acceleration of Object1 along the X-axis
$a_{1y}$ Acceleration of Object1 along the Y-axis
$v_{1x}$ Velocity of Object1 along the X-axis at start (t=0)
$v_{1x}$ Velocity of Object1 along the Y-axis at start (t=0)
$s_{1x}$ X coordinate of Object1 at start(t=0)
$s_{1y}$ X coordinate of Object1 at start(t=0)
Most of the values are the same for the Object2, with these exceptions:
$a_{max}$ denotes the acceleration of Object2.
$\alpha$ Is the direction of the acceleration of Object2
$x_1=\frac{1}{2}a_{1x}t^2+v_{1x}t+s_{1x}$
$y_1=\frac{1}{2}a_{1y}t^2+v_{1y}t+s_{1y}$
$x_2=\frac{1}{2}a_{max}cos(\alpha)t^2+v_{2x}t+s_{2x}$
$y_2=\frac{1}{2}a_{max}sin(\alpha)t^2+v_{2y}t+s_{2y}$
I'd like to solve $\alpha$, to get the direction Object2 should accelerate towards to eventually collide with Object1.
This has proven quite the task for my limited math skills.
My first course of action was to solve X and Y coordinates individually, to get the time to close distance in either direction.
$x_1=x_2$
$\frac{1}{2}a_{1x}t^2+v_{1x}t+s_{1x} = \frac{1}{2}a_{max}cos(\alpha)t^2+v_{2x}t+s_{2x}$
$\frac{1}{2}(a_{1x}-a_{max}cos(\alpha))t^2+(v_{1x}-v_{2x})t+(s_{1x}-s_{2x})= 0$
$t=\frac{-(v_{1x}-v_{2x})±\sqrt{(v_{1x}-v_{2x})^2-4*\frac{1}{2}(a_{1x}-a_{max}cos(\alpha))(s_{1x}-s_{2x})}}{2*\frac{1}{2}(a_{1x}-a_{max}cos(\alpha))}$
then the same for Y
$t=\frac{-(v_{1y}-v_{2y})±\sqrt{(v_{1y}-v_{2y})^2-4*\frac{1}{2}(a_{1y}-a_{max}sin(\alpha))(s_{1y}-s_{2y})}}{2*\frac{1}{2}(a_{1y}-a_{max}sin(\alpha))}$
Then, to collide, the time at which x and y are zero, must be the same.
$t=t$
$\frac{-(v_{1x}-v_{2x})±\sqrt{(v_{1x}-v_{2x})^2-4*\frac{1}{2}(a_{1x}-a_{max}cos(\alpha))(s_{1x}-s_{2x})}}{2*\frac{1}{2}(a_{1x}-a_{max}cos(\alpha))} = \frac{-(v_{1y}-v_{2y})±\sqrt{(v_{1y}-v_{2y})^2-4*\frac{1}{2}(a_{1y}-a_{max}sin(\alpha))(s_{1y}-s_{2y})}}{2*\frac{1}{2}(a_{1y}-a_{max}sin(\alpha))}$
I have no idea how to solve this. I'd like to end up with a formula on how to calculate $\alpha$ but I just can't do it.
