Finding the best angle of movement to cause a line-intersection. The 2019 Stack Overflow Developer Survey Results Are InIntersection Of Line and Rectangle in 2DGeneral solution for 3D line intersectionCalculating circle radius from two points on circumference (for game movement)Verify that two line segments do not cross, or projected intersection is not on either lineComparing The Rates at Which Squares and Circles Fill Large Similar Areas.Point between two points given time?list two possible coordinates of the third vertex so that the triangle has the area of 20 square unitsSolution for finding intercept point of two moving objects (XY plane)Approximating the intersection of a line and the iPhone X screen as well as its normalsIntersecting Angle between 2 Line Segments

Have you ever entered Singapore using a different passport or name?

Is an up-to-date browser secure on an out-of-date OS?

What tool would a Roman-age civilization have for the breaking of silver and other metals into dust?

If I score a critical hit on an 18 or higher, what are my chances of getting a critical hit if I roll 3d20?

How to type this arrow in math mode?

For what reasons would an animal species NOT cross a *horizontal* land bridge?

Identify boardgame from Big movie

Pokemon Turn Based battle (Python)

How to manage monthly salary

Can we generate random numbers using irrational numbers like π and e?

Distributing a matrix

Who coined the term "madman theory"?

Deal with toxic manager when you can't quit

Geography at the pixel level

Is bread bad for ducks?

Interpreting the 2019 New York Reproductive Health Act?

Is "plugging out" electronic devices an American expression?

Can a rogue use sneak attack with weapons that have the thrown property even if they are not thrown?

Aging parents with no investments

Time travel alters history but people keep saying nothing's changed

Why didn't the Event Horizon Telescope team mention Sagittarius A*?

What to do when moving next to a bird sanctuary with a loosely-domesticated cat?

Output the Arecibo Message

Did Scotland spend $250,000 for the slogan "Welcome to Scotland"?



Finding the best angle of movement to cause a line-intersection.



The 2019 Stack Overflow Developer Survey Results Are InIntersection Of Line and Rectangle in 2DGeneral solution for 3D line intersectionCalculating circle radius from two points on circumference (for game movement)Verify that two line segments do not cross, or projected intersection is not on either lineComparing The Rates at Which Squares and Circles Fill Large Similar Areas.Point between two points given time?list two possible coordinates of the third vertex so that the triangle has the area of 20 square unitsSolution for finding intercept point of two moving objects (XY plane)Approximating the intersection of a line and the iPhone X screen as well as its normalsIntersecting Angle between 2 Line Segments










0












$begingroup$


I am working on developing a simple Turret for a personal game project that I've been working on and found myself in need of a formula for detecting the proper angle to fire a projectile in order to hit a moving target.



I have been looking at the line-intersection formula for awhile, however it doesn't take time into consideration at all.



The idea here is that I have two points on a graph. The first point (P1) being the player and the second point (P2) being the Turret.



We know the following information about P1:



  • Current x & y coordinates.

  • The direction it's moving in.

  • The amount of "units" per second it's moving.

We know the following information about P2:



  • Current x & y coordinates.

  • The amount of "units" per second the point can travel.

  • The maximum range that can be traveled.

What we need to find about P2:



  • The most optimal direction to travel to intersect with P1 at the earliest possible time.


Here's a more simplified example



P1 is at (200, 400) moving 45degrees at 250 units per second. 
P2 starts at (180, 280) and can travel 900 units per second for a maximum of 1300 units.


What direction should P2 travel in order to intersect with P1 in the shortest possible time / distance.




These values are constantly changing every frame, so any help pointing me towards what formula's I need to be using or an in-detail explanation of how to calculate this would be extremely appreciated.



BONUS: Even though P1 and P2 are bound to a single position on the "grid" they both have a size, for example P1 may be 80 units wide and P2 may be 30 units wide, how could I include this in the calculations required to determine the best possible direction.




NOTE: I'm not just simply looking for an answer, please provide reading material on this as-well if possible, or even KHAN Academy videos. I've been searching for a few days now and I've watched tons of video on angles and line intersection but I still don't understand this and really need to.










share|cite|improve this question







New contributor




Christian Tucker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$











  • $begingroup$
    check this Wikipedia article, it has a lot of info, including picking an angle to hit a point with $(x, y)$ coordinates: en.wikipedia.org/wiki/Projectile_motion
    $endgroup$
    – Vasya
    Apr 7 at 21:40










  • $begingroup$
    @Vasya Awesome, thanks. Any additional material you have I'm glad to take.
    $endgroup$
    – Christian Tucker
    Apr 7 at 21:50










  • $begingroup$
    Check also this resource which has pretty good explanations regarding firing a projectile: school-for-champions.com/science/…
    $endgroup$
    – Vasya
    Apr 7 at 21:54















0












$begingroup$


I am working on developing a simple Turret for a personal game project that I've been working on and found myself in need of a formula for detecting the proper angle to fire a projectile in order to hit a moving target.



I have been looking at the line-intersection formula for awhile, however it doesn't take time into consideration at all.



The idea here is that I have two points on a graph. The first point (P1) being the player and the second point (P2) being the Turret.



We know the following information about P1:



  • Current x & y coordinates.

  • The direction it's moving in.

  • The amount of "units" per second it's moving.

We know the following information about P2:



  • Current x & y coordinates.

  • The amount of "units" per second the point can travel.

  • The maximum range that can be traveled.

What we need to find about P2:



  • The most optimal direction to travel to intersect with P1 at the earliest possible time.


Here's a more simplified example



P1 is at (200, 400) moving 45degrees at 250 units per second. 
P2 starts at (180, 280) and can travel 900 units per second for a maximum of 1300 units.


What direction should P2 travel in order to intersect with P1 in the shortest possible time / distance.




These values are constantly changing every frame, so any help pointing me towards what formula's I need to be using or an in-detail explanation of how to calculate this would be extremely appreciated.



BONUS: Even though P1 and P2 are bound to a single position on the "grid" they both have a size, for example P1 may be 80 units wide and P2 may be 30 units wide, how could I include this in the calculations required to determine the best possible direction.




NOTE: I'm not just simply looking for an answer, please provide reading material on this as-well if possible, or even KHAN Academy videos. I've been searching for a few days now and I've watched tons of video on angles and line intersection but I still don't understand this and really need to.










share|cite|improve this question







New contributor




Christian Tucker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$











  • $begingroup$
    check this Wikipedia article, it has a lot of info, including picking an angle to hit a point with $(x, y)$ coordinates: en.wikipedia.org/wiki/Projectile_motion
    $endgroup$
    – Vasya
    Apr 7 at 21:40










  • $begingroup$
    @Vasya Awesome, thanks. Any additional material you have I'm glad to take.
    $endgroup$
    – Christian Tucker
    Apr 7 at 21:50










  • $begingroup$
    Check also this resource which has pretty good explanations regarding firing a projectile: school-for-champions.com/science/…
    $endgroup$
    – Vasya
    Apr 7 at 21:54













0












0








0





$begingroup$


I am working on developing a simple Turret for a personal game project that I've been working on and found myself in need of a formula for detecting the proper angle to fire a projectile in order to hit a moving target.



I have been looking at the line-intersection formula for awhile, however it doesn't take time into consideration at all.



The idea here is that I have two points on a graph. The first point (P1) being the player and the second point (P2) being the Turret.



We know the following information about P1:



  • Current x & y coordinates.

  • The direction it's moving in.

  • The amount of "units" per second it's moving.

We know the following information about P2:



  • Current x & y coordinates.

  • The amount of "units" per second the point can travel.

  • The maximum range that can be traveled.

What we need to find about P2:



  • The most optimal direction to travel to intersect with P1 at the earliest possible time.


Here's a more simplified example



P1 is at (200, 400) moving 45degrees at 250 units per second. 
P2 starts at (180, 280) and can travel 900 units per second for a maximum of 1300 units.


What direction should P2 travel in order to intersect with P1 in the shortest possible time / distance.




These values are constantly changing every frame, so any help pointing me towards what formula's I need to be using or an in-detail explanation of how to calculate this would be extremely appreciated.



BONUS: Even though P1 and P2 are bound to a single position on the "grid" they both have a size, for example P1 may be 80 units wide and P2 may be 30 units wide, how could I include this in the calculations required to determine the best possible direction.




NOTE: I'm not just simply looking for an answer, please provide reading material on this as-well if possible, or even KHAN Academy videos. I've been searching for a few days now and I've watched tons of video on angles and line intersection but I still don't understand this and really need to.










share|cite|improve this question







New contributor




Christian Tucker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




I am working on developing a simple Turret for a personal game project that I've been working on and found myself in need of a formula for detecting the proper angle to fire a projectile in order to hit a moving target.



I have been looking at the line-intersection formula for awhile, however it doesn't take time into consideration at all.



The idea here is that I have two points on a graph. The first point (P1) being the player and the second point (P2) being the Turret.



We know the following information about P1:



  • Current x & y coordinates.

  • The direction it's moving in.

  • The amount of "units" per second it's moving.

We know the following information about P2:



  • Current x & y coordinates.

  • The amount of "units" per second the point can travel.

  • The maximum range that can be traveled.

What we need to find about P2:



  • The most optimal direction to travel to intersect with P1 at the earliest possible time.


Here's a more simplified example



P1 is at (200, 400) moving 45degrees at 250 units per second. 
P2 starts at (180, 280) and can travel 900 units per second for a maximum of 1300 units.


What direction should P2 travel in order to intersect with P1 in the shortest possible time / distance.




These values are constantly changing every frame, so any help pointing me towards what formula's I need to be using or an in-detail explanation of how to calculate this would be extremely appreciated.



BONUS: Even though P1 and P2 are bound to a single position on the "grid" they both have a size, for example P1 may be 80 units wide and P2 may be 30 units wide, how could I include this in the calculations required to determine the best possible direction.




NOTE: I'm not just simply looking for an answer, please provide reading material on this as-well if possible, or even KHAN Academy videos. I've been searching for a few days now and I've watched tons of video on angles and line intersection but I still don't understand this and really need to.







geometry






share|cite|improve this question







New contributor




Christian Tucker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|cite|improve this question







New contributor




Christian Tucker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|cite|improve this question




share|cite|improve this question






New contributor




Christian Tucker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Apr 7 at 20:25









Christian TuckerChristian Tucker

1




1




New contributor




Christian Tucker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Christian Tucker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Christian Tucker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • $begingroup$
    check this Wikipedia article, it has a lot of info, including picking an angle to hit a point with $(x, y)$ coordinates: en.wikipedia.org/wiki/Projectile_motion
    $endgroup$
    – Vasya
    Apr 7 at 21:40










  • $begingroup$
    @Vasya Awesome, thanks. Any additional material you have I'm glad to take.
    $endgroup$
    – Christian Tucker
    Apr 7 at 21:50










  • $begingroup$
    Check also this resource which has pretty good explanations regarding firing a projectile: school-for-champions.com/science/…
    $endgroup$
    – Vasya
    Apr 7 at 21:54
















  • $begingroup$
    check this Wikipedia article, it has a lot of info, including picking an angle to hit a point with $(x, y)$ coordinates: en.wikipedia.org/wiki/Projectile_motion
    $endgroup$
    – Vasya
    Apr 7 at 21:40










  • $begingroup$
    @Vasya Awesome, thanks. Any additional material you have I'm glad to take.
    $endgroup$
    – Christian Tucker
    Apr 7 at 21:50










  • $begingroup$
    Check also this resource which has pretty good explanations regarding firing a projectile: school-for-champions.com/science/…
    $endgroup$
    – Vasya
    Apr 7 at 21:54















$begingroup$
check this Wikipedia article, it has a lot of info, including picking an angle to hit a point with $(x, y)$ coordinates: en.wikipedia.org/wiki/Projectile_motion
$endgroup$
– Vasya
Apr 7 at 21:40




$begingroup$
check this Wikipedia article, it has a lot of info, including picking an angle to hit a point with $(x, y)$ coordinates: en.wikipedia.org/wiki/Projectile_motion
$endgroup$
– Vasya
Apr 7 at 21:40












$begingroup$
@Vasya Awesome, thanks. Any additional material you have I'm glad to take.
$endgroup$
– Christian Tucker
Apr 7 at 21:50




$begingroup$
@Vasya Awesome, thanks. Any additional material you have I'm glad to take.
$endgroup$
– Christian Tucker
Apr 7 at 21:50












$begingroup$
Check also this resource which has pretty good explanations regarding firing a projectile: school-for-champions.com/science/…
$endgroup$
– Vasya
Apr 7 at 21:54




$begingroup$
Check also this resource which has pretty good explanations regarding firing a projectile: school-for-champions.com/science/…
$endgroup$
– Vasya
Apr 7 at 21:54










0






active

oldest

votes












Your Answer





StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Christian Tucker is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3178725%2ffinding-the-best-angle-of-movement-to-cause-a-line-intersection%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








Christian Tucker is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















Christian Tucker is a new contributor. Be nice, and check out our Code of Conduct.












Christian Tucker is a new contributor. Be nice, and check out our Code of Conduct.











Christian Tucker is a new contributor. Be nice, and check out our Code of Conduct.














Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3178725%2ffinding-the-best-angle-of-movement-to-cause-a-line-intersection%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Hidroelektrana Sadržaj Povijest | Podjela hidroelektrana | Snaga dobivena u hidroelektranama | Dijelovi hidroelektrane | Uloga hidroelektrana u suvremenom svijetu | Prednosti hidroelektrana | Nedostaci hidroelektrana | Države s najvećom proizvodnjom hidro-električne energije | Deset najvećih hidroelektrana u svijetu | Hidroelektrane u Hrvatskoj | Izvori | Poveznice | Vanjske poveznice | Navigacijski izbornikTechnical Report, Version 2Zajedničkom poslužiteljuHidroelektranaHEP Proizvodnja d.o.o. - Hidroelektrane u Hrvatskoj

Bosc Connection Yimello Approaching Angry The produce zaps the market. 구성 기록되다 변경...

WordPress Information needed