# Tagged Questions

The motion physics of the objects sailing through the air, ranging from thrown baseballs to battleship cannonfire to falling rocks.

53 views

### How to make an enemy projectile head to the player's position with constant speed

How can I dynamically set the movement speed of the X and Y of the projectile so that it moves at a constant speed when the projectile heads at the player's position? I know this has something to do ...
44 views

### Slime Volleyball Physics Implementation

I am trying to recreate the Slime Volleyball game; however I am unsure how to go about implementing the physics of the ball movement. The game consists of a circular ball and semi circle players that ...
49 views

### Adjust Aim Angle for Motion with Accelerating Bullet

So, here's my problem: I have a turret attached to a ship that moves at a variable speed through my game world, shooting at the centre of another ship travelling through the game world in a possibly ...
90 views

### Rotate arrow without using Unity3d physics engine

I have this code that simulates the movement of a projectile without using the unity physics engine IEnumerator LaunchProjectile(int angle, float speed) { // Move projectile to the position of ...
78 views

### How can I shoot an arrow if I know the shot power and target?

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 ...
60 views

### Finding collision point of moving projectile/bullet with a cube

I am programming a game in the spirit of Wolfenstein 3D (2D grid map, 1 cell = 1 cube) and I wanted to implement shootings. I didn't want the shootings to happen in one frame so, I wanted to see the ...
57 views

### How do I create a rocket projectile that is “dropped”, then accelerates toward the enemy?

I'm making an Asteroids-like game. I've successfully implemented linear bullets. Now I want to add some rocket-styled bullets, with a certain flight path: The rockets should be "dropped" back first, ...
173 views

### Simulating beer pong physics in Unity

I'm trying to create a simple beer pong game in Unity. The basic idea is this - when it's your turn to shoot, you use your mouse to pick a point on the table that you want the ball to hit and bounce ...
1k views

### How to make an arrow land at a specific position in 3D world space

In my game when I click with the mouse on the terrain somewhere, I'd like the player to fire an arrow to that position in a parabolic fashion. The arrow has a position, acceleration and velocity all ...
1k views

### Determing an object's position along a curve over time

I have some objects in my game which are "thrown". At the moment I am trying to implement this by having these objects follow a parabolic curve. I know the start point, the end point, the vertex and ...
401 views

### In a 2D top-down game, how can I create projectiles that have a height?

A 2D game called Deer Hunter has projectiles like this: Are the projectiles 2D or 3D models? How could I implement something similar?
126 views

### Speed needed to make a car jump from a ramp

I need to make a car jump from a ramp to another, and I need this to be done using AI so I thought it would be enough to set a fixed speed for my car when near the ramp, in order to let it jump ...
1k views

### Javascript - create a new bullet instance every time a user event is triggered

Basically I have a function that I need to create an object of every time the user presses space(event listeners not shown here). function arrow(){ this.x = playerXPos + 40; this.y = ...
593 views

### Calculating Projectile Movement

I'm having some trouble putting together a method that will constantly move a "bullet" in the same direction accurately. Here is what I have so far public Vector3f moveFromPosition(Vector3f location, ...
157 views

### Projectile Delta Movement

I'm running into an issue where I can't get the Projectiles to travel in the right direction, I'll admit my trig is a little rusty, anyone know how below might be improved? I am trying to get the ...
300 views

### SpriteKit: Is applyImpulse not working correctly?

I am writing a free throwing system and because of this, I created a ball using following code. self.ball.position = CGPointMake(posX, posY) self.ball.fillColor = SKColor.blueColor() ...
149 views

### Launch Velocity for Simple 3D Projectile [duplicate]

This is a pretty easy question, but I can't quite figure out the answer. I have: The initial position of a projectile. The gravity vector. The (stationary) target I want to hit. A maximum launch ...
221 views

### Solving the “bullet problem” [duplicate]

I have a 3D matrix filled with "empty space" where I put some objects (objects are represented as bunch of occupied space). The bullet is fired from coordinates (x1,y1,z1) at angles ...
243 views

### Trajectory of a spinning ball

How do I would precalculate trajectory of a kicked ball, when it's spinning? I'm applying spinning using simplified Magnus effect every frame like this and it works: acceleration += swerve × ...
795 views

### Creating a arc path connecting two GameObjects in Unity

I am working on a game on a spherical surface which first of all is a big challenge in itself. I want to create a path on an arc which connects two points ( seen in the image ) and show an arc path ...
20 views

### Projectile Motion in lwjgl with java [duplicate]

I was trying to make a game with a bow and arrow using lwjgl but I couldent get the arch right. I have a function called projectile that is updated once a frame for each arrow. my frame cap is at 60 ...
676 views

### Trajectory Projectile with Collision Detection

Right now I am trying to create projectile for cannon in which I want to detect collision also. At present I have simple working projectile after using two references Unity – How to display ...
713 views

### Projectile motion based off angle

I was using this code to hit an object that is moving horizontally(from right to left) and player on the left is throwing bullets to hit the object.But, what I am finding difficult is projectile ...
165 views

### What formula does this projectile velocity code derive from?

//Calculate the velocity needed to throw the object to the target at specified angle. float projectile_Velocity = target_Distance / (Mathf.Sin(2 * firingAngle * Mathf.Deg2Rad) / gravity); ...
137 views

### Physics / drag of object falling through atomsphere [closed]

Trying to simulate an object plunging into atmosphere. It seems to work, until the velocity falls past terminal velocity... down to zero... and then back up! Something must be wrong with how I am ...
3k views

### Rotate image around a specified origin

I'm trying to rotate my Turret.png (small Gunhead with a laser in front) towards the mouses location on the screen. I tried just using my method for rotating projectiles towards the next step on their ...
813 views

### Aim at moving target (or predicting target's position at time it takes for projectile to hit it) [duplicate]

I have a game where I know the location and velocity of my target. I know my own location and the speed of my projectile. I want to determine either the location of the intersection between my ...
954 views

### What units does Sprite Kit use for physics?

I'm developing a simple ball game in Sprite Kit. I need to predict the ball's trajectory, so I went back to my physics book for the equations for acceleration, time, speed and space. The problem is ...
301 views

### Calculating/Predicting a way

I'm just starting with physics, so I'm not always sure about what I'm doing. It's a 2D project but I'm using 3D physical objects like SphereCollider etc.. What I have: Objects floating in space and ...
588 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 ...
341 views

### Forcing one projectile to follow close behind an initial projectile

I'm shooting out a projectile and I want another projectile to closely follow it. I can't simply shoot out the second projectile at a slightly lesser time because the first projectile may change ...
168 views

### What kind of calculations do I have to make for projectiles? [closed]

I could never find out, how to create projectiles in a 2D game. Does it need linear algebra? If not, what to do to calculate its path? I just simply want to create a projectile that follows a ...
696 views

### How can I determine trajectory from distance and time, without initial velocity?

I'm attempting to develop a Mortar that needs to lead it's shot to the target enemy. The shot will have a pre-determined constant flight time of (2.5 seconds) and it will have where the enemy should ...
216 views

### Tracing a 2d path through multiple gravity fields

For a projectile starting at origin O, an initial velocity V, and several stationary planets P[n], how would I pre-calculate and store the path it would take without actually stepping through each ...
646 views

### how to predict enemy postion to shoot bullet same kingdom rush

i'm doing a tower defense game same kingdom rush, enemy can run curve not only linearly. i found this link : 2D tower defense - A bullet to an enemy but this link use only for enemy run linearly. ...
461 views

### Calculating projectile velocity from moving object

I'm working on a top down space shooter and am having trouble with calculating/understanding the physics for projectiles launched from the space ship. The ships have a velocity vector and a turret ...
563 views

### How do I make good guy attacks only hit bad guys and vice versa?

My game has many different type of good guys and many different type of bad guys. They will all be firing projectiles at each other but I don't want any accidental collateral damage to occur for ...
466 views

### How to know when a bullet has hit its destination in a game with a fixed timestep? [duplicate]

@James is wording my question better than I am, so I figured I'd put this here: I believe what you are asking is that you have a bullet moving in a game with a fixed timestep and that when the ...
387 views

### How to account for acceleration when aiming projectiles?

How do I aim a constant speed projectile to hit a target if there is a constant acceleration vector acting on it? (For example, the wind and gravity from Worms.)
8k views

### How can I find a projectile's launch angle?

I am making a 2d game in which units fire arrows at each other. I know the shooter's and the target's position and the initial velocity of the projectile. I want to know the angle the projectile ...
1k views

### Discover x,y coordinates given set arc distance and rotation

I have a turn-based car simulation. My vehicles have a maximum speed they can travel in a round, as well as a maximum amount they can change their heading over the course of a round. Say, 20 meters ...
452 views

### Bullets and projectiles in component based entity systems

Currently one of my games engines written for a shooter seems to work correctly. Currently projectiles are sparse, travel quite slowly and are synced over network they are generated as entities. ...
864 views

### Tracking Object Position - Firing on a Trajectory

How can I calculate the position of an object after "firing" it from a fixed point? I am to create a small game - most likely with canvas (pure HTML, JS based) or Adobe Flash - in which the player ...
5k views

### 2D tower defense - A bullet to an enemy

I'm trying to find a good solution for a bullet to hit the enemy. The game is 2D tower defense, the tower is supposed to shoot a bullet and hit the enemy guaranteed. I tried this solution - ...
18k views

### How are bullets simulated in video games?

I have been playing games like MW2 recently and, as a programmer, I tend to ask myself how do they make the game so immersive. For example, how to they simulate bullet speed. When an NPC fires a ...
105 views

### Initial direction of intersection between two moving vehicles? [duplicate]

Possible Duplicate: Predicting enemy position in order to have an object lead its target I'm working with a bit of projectile prediction for my AI and I'm looking for some ideas, any input? ...
618 views

### How make a laser path prediction line like a “slingshot cowboy” game?

How so I make a laser path prediction line like a “slingshot cowboy” game in cocos2d or box2d and select the target like "slingshot cowboy" game.
2k views

### Adding air drag to a golf ball trajectory equation

I'm developing a 2D golf game in VB.NET 2005, but I am stuck on how to implement air or wind drag that should affect the ball. Already I have these equations for projectile: Vo ...