1 vote
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 ...
• 5,793
235 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 ...
144 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,...
• 177
29 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 ...
• 145
7k 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,095
1 vote
3k 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 ...
1 vote
1k views

### How do I launch a ballistic projectile to hit a moving target, given: launch position & angle, target position & velocity?

This problem is in 3D space. My question is: How do you find the initial velocity of a projectile that flies under constant gravity, so that it hits a target moving with constant velocity, given the ...
1k 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 ...
• 101
1 vote
711 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 ...
1 vote
643 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 ...
• 3,729
445 views

### What math function represents Minecraft bow angle/height?

I am working on a mod in Minecraft Forge/MCP using Java. Aiming a bow is controlled by your head pitch and yaw rotation. Right now I have a math function that automatically looks at the target. But I ...
• 75
1 vote
352 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) ...
• 11
263 views

### Projectile arc velocity changes depending on target x-axis position

I am trying to create an enemy for a 2D platformer that launches a projectile in an arc at the player position (think throwing a grenade, launching an arrow style parabola). Everything works as ...
331 views

### How to make Player consistently jump *to* a specific target rather than *towards* it?

I'm trying to make it so if my player hits "E" then they jump precisely to a specific target. The current code results in player jumping towards the target but not really making it there. I'...
• 69