Linked Questions

1
vote
0answers
1k views

How can I shoot an arrow if I know the shot power and target? [duplicate]

I am trying to shoot an arrow at a target with a 100% success rate. Given the initial force applied to the arrow, the gravity, the location of the archer, and the location of the target, how can I do ...
0
votes
0answers
218 views

Getting launch angle for projectile given height, distance and speed in 3D [duplicate]

EDIT: This is not a duplicate as the proposed solution does not seem to work. See the bottom of this question for clarification. I am trying to calculate the launch velocity of a ball that needs to ...
0
votes
0answers
128 views

Algorithm for 2d AI aiming to compensate for gravity [duplicate]

In a 2d side-view scenario I have two riflemen aiming at each other. By normalizing the x and y difference they know the direct path to the enemy. However, gravity will pull the projectiles downwards,...
0
votes
0answers
21 views

How do I calculate the required force to launch an object? [duplicate]

I want to use a rigidbody AddForce() method on an object to launch it over from the enemy to the player, like throwing a ball at a target. The problem is, I'm not ...
0
votes
0answers
17 views

moving a projectile launched from certain height to with known angle and distance of target in 3d without using physic engine [duplicate]

I am not really good in math but I did like to learn as much as I can so recently I was playing with Unity physics and enjoy it but I did stop a little because I need to "cheat" on speed sometimes so ...
6
votes
1answer
3k views

How do I determine a good path for 2D artillery projectiles?

I'm building a little "tank wars" game (like this one). I understand the math, and I am able to define a parabola from the launcher to the objective I want to reach. The parabola depends on the ...
1
vote
1answer
2k views

Calculate initial velocity for trajectory given duration, launch angle, and distance

I need my entity to go from point A to point B with a given launch angle over a given time. I've been able to figure out the initial velocity without the constraint of the launch angle, but I can't ...
2
votes
1answer
360 views

Sniper aim prediction

I'm trying to make a sniper aim prediction for an Unreal Engine 4 game. I've found this interesting question Projectile Aim Prediction with Acceleration, and I tried to implement in C++ what DMGregory ...
0
votes
1answer
279 views

Unity 2D launch player towards mouse location

few notes: I'm new to game development I'm not new to developing (1 year of front end web development) I'm trying to get my character to launch towards mouse left click button (which I understood to ...
1
vote
3answers
198 views

Targeting with a ballistic gun

I am trying to determine the gun elevation angle of a gun that fires ballistic projectiles. For a target at a certain distance D, I will have to compute an angle that increases with D. This relation ...
0
votes
1answer
129 views

Trying to use 3D vectors for a 2D ping pong game

I am trying to setup a virtual ping pong table, and am getting a little stuck in trying to understand how to do 3D vector math and render it in 2D. So far, my plan is for the ball: X = up/down, Y = ...
1
vote
1answer
89 views

Efficiently detect shoot direction with gravity playing a role?

How could I efficiently calculate shoot direction for enemy AI in order for it to hit the player? Things I know: player position, player velocity, gravity, bullet spawn position, bullet initial ...
1
vote
0answers
113 views

Projectile initial motion to hit a target position

I'm working on a 3D game where i need to shoot a projectile (arrow) in order to hit a target position. The projectile has an origin position and a motion vector v(t) where "t" is a time unit. v(t) ...
0
votes
1answer
84 views

How to randomly calculate the necessary velocity changes to reach a x,y,z target?

I am working on creating a mini vector graphics ping pong table, as described in this previous post: Trying to use 3D vectors for a 2D ping pong game Currently, the stage I am at, I am trying to make ...
0
votes
0answers
78 views

Launching a projectile and landing it in a specific spot with different elevations?

I have a starting position for a projectile and a target position I want it to land on given an initial x and y velocity. Doing this on a level field is fairly straightforward but I'm struggling to ...

15 30 50 per page