# Questions tagged [projectile-physics]

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

141 questions
Filter by
Sorted by
Tagged with
841 views

### Why aren't game bullets implemented as if they were real bullets?

Let's say I'm working on a 3D first-person shooter and the boss is a stickler for realism, and orders me to implement the bullets as tiny projectiles that travel, say, 1000 meters per second. What ...
66 views

### why collision not detection not happened in Two Sphere

I start practice 3d collision detection of sphere in OpenGl containing two sphere one sphere hit using cannon gun but collision not detect when it hit and when i debug code collision statement triger ...
237 views

### How can I recreate the movement of arrow in air?

Given two Particles A and B which forms the arrow itself, A.P an edge of it and the opposite one B.P. Like so A.P---------B.P. const float DistArrow = 60; Where ...
313 views

### Best practice for RTS accuracy/aim

As I'm developing a RTS game set during the Napoleonic Campaign, I've got a question about the best method to implement 'bad aim' for the AI, as the accuracy of muskets were quite terrible back then. ...
121 views

### Scrolling background after firing projectile

I have a projectile which I fire using the mouse coords as the direction vector which I scale with a velocity vector and add a gravity vector to complete this simple simulation. I want to scroll the ...
486 views

### How to set rotation of a projectile in a parabolic arc in Box2D? [duplicate]

I have trouble making my projectile - in this case an arrow - rotate as it should when it's travelling in a parabolic arc. It doesn't rotate at all while travelling, only until it collides with ...
713 views

### Find Initial Velocity for Parabolic Arc with Fixed Angle that Crosses Target Position

In my game I want skeletons to occasionally lob bones at the player. The player can be anywhere in relation to the skeleton (above or below, to the left or right), and I want the skeletons to throw a ...
882 views

### finding the angle to launch a projectile at a 3d coordinates

I have a game where the user can shoot a bullet and the bullet flies through 3 dimensional space and eventually hits the ground somewhere. My question is how can I calculate the ...
524 views

### How to calculate the ideal hit of arrow?

I am trying to make the AI shoot an arrow and always hit the target. Assuming that the target is within his range I am stuck what the correct way is to do this. I search and found some solutions but ...
2k views

### How to create a projectile motion of a cannonball in top down view?

Objective To move the bullet with projectile motion to specific destination by touch point. In the below image is an example of a bullet which has a projectile motion. On my observation, the bullet ...
297 views

### shooting the projectile in the way it is facing [duplicate]

I got my projectile facing the right way thanks to @S. Tarık Çetin. But now I want it to move the direction it's facing. I think I need to use RayCastHit2D but I am ...
4k views

### Projectile Direction Unity

I want to shoot a projectile in the direction the gun is facing. With my current script it only shoots vertically. (I can also make it go horizontally but that's it). This is my ...
3k views

### How to make Pong ai paddle?

I'm trying to make an ai so the paddles will move to position before the ball reaches it. I'm not sure how to go about it in this case. Here's the game http://cssdeck.com/labs/ping-pong-game-tutorial-...
115 views

### Accelerating Missile guidence

Background I'm building a simple game where two ships are launching missiles at each other in space. Stuff got complicated when the ships started moving in a frictionless environment and the missiles ...
641 views

### Psudo 3D(2.5D?) Projectile motion

I'm trying to simulate a ball coming at the screen with a projectile motion arc in 2d space. Is there a set of equations to deal with this. I would imagine the equation would need to take in the ...
621 views

### Guided Missile with Constant Time

I'm building a game with players and missiles. I want to fire a missile from P1 to P2. The missile should always take exactly five seconds to reach P2. The missile should also track P2. If P2 moves ...
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 ...
557 views

### Collision Between SKSpriteNode and SKShapeNode

I'm trying to create a collision between two objects. One is a SKSpriteNode and the other is a SKShapeNode. The code I have so ...
130 views

### How often should I calculate the position of a bullet?

In game's like Battlefield or Arma, how many times per second is the position of a bullet calculated?
3k views

### Destroy object on Collision

I have a strange problem... I need a 2D projectile to destroy itself after colliding with an object. I have used all of the different ways to do this on the internet but to no avail; the object ...
74 views

### Rigidbody Projectile Being Suspended In Mid-Air

I am experiencing problems with Unity's Rigibody feature. Whenever I try firing a projectile, it gets suspended in mid-air. The projectiles are stored in an object pool. Below is the code and images ...
2k views

### Calculating initial velocities given trajectory parabola

I'm working on a volleyball game but my maths/physics knowledge isn't quite up to par. I need some help with the following problem: The player can hit the ball from anywhere on the left of the court ...
4k views

### How can I launch a GameObject at a target if I am given everything except for its launch angle?

I am trying to launch an object at a target, given its position, its target position, the launch speed, and the gravity. I am following this formula from Wikipedia:  \theta = arctan \bigg( \frac{v^...
703 views

### How to predict future position of an object(bullet sync)?

There is a multiplayer game and server sends to all clients a message when a shot happens, containing bullet position, bullet velocity and timestamp. By having timestamp, we can calculate the lag, let'...
59 views

### Timed Line Drawing

I'm trying to program a remake of the classic Missile Command Atari game from scratch, but I've run into a problem. So I have a function that can draw a line from one point to another. I figured I ...
177 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 ...
1k views

### Elastic Circle-Circle collision detection and response / Slime Volleyball physics

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 ...
292 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 ...
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 ...
347 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 ...
105 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, ...
1k 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 ...
1k 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 ...
3k 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?
478 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 ...
847 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 ...
288 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 (verticalAngle,...
1k 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: ...
2k 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 ...
3k 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 ...
45 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 ...
2k 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 ...
209 views

...
492 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 ...
2k 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 ...
3k 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 ...
2k 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 ...
4k 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 ...