Can Trigonometry Help Predict Projectile Interception in Video Games?

  • Context: Undergrad 
  • Thread starter Thread starter MrDoomMaster
  • Start date Start date
  • Tags Tags
    Projectile
Click For Summary

Discussion Overview

The discussion revolves around the application of trigonometry to predict the interception of a projectile with a moving target in a video game context. Participants explore the mathematical modeling of projectile motion and target movement, focusing on how to calculate the appropriate angle and direction for firing a projectile to ensure it hits a moving target.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant describes a scenario involving a player-controlled ship firing projectiles at moving targets, emphasizing the need to account for the target's velocity to ensure a hit.
  • Another participant suggests using a "maneuvering board" approach, recommending the drawing of vectors to visualize the problem and compute the necessary angles for interception.
  • A third participant expresses difficulty in finding resources or information on maneuvering boards, indicating a gap in accessible knowledge on the topic.
  • A later reply provides a link to a Navy publication on maneuvering board problems, suggesting that familiarity with these methods could lead to the development of specific equations for the problem at hand.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best approach to solve the problem, with some suggesting graphical methods while others seek more theoretical or equation-based solutions. The discussion remains open-ended with multiple perspectives on how to tackle the interception challenge.

Contextual Notes

Participants acknowledge the complexity of the problem and the potential need for tutorials or additional resources to fully grasp the concepts involved in using maneuvering boards and trigonometric calculations.

MrDoomMaster
Messages
2
Reaction score
0
Here is the scenario I am faced with:

I am developing a game that involves a main ship (the player) scrolling forward through a level firing at other ships that fly by.

There is a particular weapon the player has that will shoot a specific straight-moving projectile at a moving target. Since this moving projectile is slower than the ships move, the projectile needs to be fired in a way that it will "intersect" with the target at some point, thus hitting it no matter how fast it's going.

Instead of firing my projectile at the target's current location (which provides the target a way to easily dodge the projectile), the projectile needs to account the velocity of its target and fire at an angle that would cause it to "meet" the ship at a specific location in space.

I hope I've been detailed enough. I've been losing hair trying to visualize a formula for this. Thanks!
 
Physics news on Phys.org
In navigation, it is called a "maneuvering board" (you can google that). Draw a picture and use vectors.

First, draw a heads-up view from the projectile, with one vector directly forward, indicating its speed. Draw a second vector from the same origin indicating the true speed and direction of the target ship. Compute the 3rd leg of the triangle for the relative course and speed of the ship.

Then draw a heads-up view of the location of the projectile and target. The projectile goes in the middle and the target is whatever distance and direction you see it in. Use the speed and direction you calculated in the first part and find where that intersects with the speed vector for the projectile, which will then give you the direction the projectile needs to go.

It isn't an easy problem the first time you see it, so you may need to find yourself a good tutorial on maneuvering boards and learn it.
 
I was not able to find anything on this via google...
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
Replies
4
Views
4K
  • · Replies 16 ·
Replies
16
Views
5K
  • · Replies 23 ·
Replies
23
Views
4K
  • · Replies 9 ·
Replies
9
Views
3K
Replies
11
Views
7K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
5K
  • · Replies 96 ·
4
Replies
96
Views
13K