How can I calculate the force vector for a mortar in a computer game?

  • Context: Undergrad 
  • Thread starter Thread starter s w
  • Start date Start date
  • Tags Tags
    Trajectory
Click For Summary

Discussion Overview

The discussion focuses on calculating the force vector required to launch a mortar in a computer game, given the initial position, target position, target height, mass of the object, and gravity, while assuming no air resistance. The aim is to achieve a parabolic arc that allows the mortar to hit a target at varying heights and distances.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant outlines the need to calculate a force vector based on initial and target positions, target height, and gravity, emphasizing the importance of achieving a high parabolic arc.
  • Another participant introduces the concept of air resistance and suggests that the force calculations depend on the magnitude of this resistance, proposing different equations for motion in the presence of drag.
  • A third participant reiterates the assumption of no drag, indicating that the previous mention of resistance is not applicable to the current scenario.
  • A further contribution suggests using equations in three dimensions and applying Newton's second law (F=ma) while also mentioning methods to estimate air resistance if needed.

Areas of Agreement / Disagreement

Participants express differing views on the relevance of air resistance in the calculations, with some insisting on its inclusion while others maintain the focus on a no-drag scenario. The discussion remains unresolved regarding the best approach to incorporate or disregard air resistance in the calculations.

Contextual Notes

There are limitations related to the assumptions made about air resistance, which could significantly affect the calculations. Additionally, the discussion does not resolve how to handle the complexities of motion in three dimensions or the specific parameters for estimating resistance.

s w
Messages
4
Reaction score
0
I'm in the process of created a computer game and I want to introduce a mortar into the game. What I want to do is given the initial position, target position, and target height, calculate the force vector that is needed to launch the mortar so it hits the target height and target distance. The reason I put a target height in there is so the mortar is doing an appropriate parabolic arc. I don't want it to just do a slight arc and hit the target, I want it to go relatively high but still remain inside the bounds of the level.

So to summarize. I know the initial position, target position, target height, mass of the object, and gravity (assume no drag) and I want to know the force vector needed. It also must be said that the initial and target positions lie in all 3 planes. So I'd really like to be able to hit a target that is higher or lower than the initial position if possible. As for the target height, that is the height above the initial position.
 
Physics news on Phys.org
it depends if you have the resisting force of air and in what magnitude?F=kmv or F=kmv.v or ... and this depends on your estimated speed, without resistance: X=V*COSa*t,Y=(V*SINa*t)-((1/2)*g*t.t)
 
Quoted from above.
s w said:
(assume no drag)
 
i don't study physics in english so i am not familiar with some words but anyway just use the equations i mentioned in three dimension(x,y,z) and simply use F=ma thing on them, plus ,if you want to calculate the resistance first check your estimated speed with some table to see if the resistance is kmv or kmv.v and also you can estimate it by using the taylors formula or somethinh(f(X)=a1+a2x+a3xx+a4xxx+...) then cut off from xx.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
32K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
6
Views
2K
Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K