- #1
nook79
- 2
- 0
Hi. Me and my dad (math teacher) are having some trouble finding the answer to a seemingly fairly easy problem.
It is somewhat similar to projectile trajectory math but with the difference that the projectile have an initial velocity and there's no gravity, only acceleration.
Imagine the game Asteroids. The ship is floating at a certain velocity (x, y).
The ship can accelerate in any direction to move. The acceleration force is constant.
What I want is to find the acceleration component (or angle of acceleration vector) so that the ship will hit a defined target point (x, y).
I can offset all positions and angles so that the ship is at position (0, 0) and the target is at (x, 0) to make calculation easier.
One tricky part is that the ship has a maximum speed (magnitude of velocity component), but the initial velocity can be anything between 0 and maximum speed.
I'd be really happy to see some solution for this, with or without maximum speed of the ship.
Please ask if I'm unclear!
Thanks
Mattias
It is somewhat similar to projectile trajectory math but with the difference that the projectile have an initial velocity and there's no gravity, only acceleration.
Imagine the game Asteroids. The ship is floating at a certain velocity (x, y).
The ship can accelerate in any direction to move. The acceleration force is constant.
What I want is to find the acceleration component (or angle of acceleration vector) so that the ship will hit a defined target point (x, y).
I can offset all positions and angles so that the ship is at position (0, 0) and the target is at (x, 0) to make calculation easier.
One tricky part is that the ship has a maximum speed (magnitude of velocity component), but the initial velocity can be anything between 0 and maximum speed.
I'd be really happy to see some solution for this, with or without maximum speed of the ship.
Please ask if I'm unclear!
Thanks
Mattias