# Tagged Questions

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

2k 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 = ...
479 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. ...
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? ...
2k 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 ...
635 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.
563 views

### Simplified trajectory equation to identify Time Taken(t) by a protectile to travel Distance(d), under gravity?

I am building a game, where I have to plot a trajectory of a ball in 3D space, launched with an inital velocity Sx, Sy, Sz. [I am using OpenGL and Android-NDK] Lets assume Sz is always 0. And Sx ...
1k views

### Trying to make a game with C++, using lists to store bullets and enemies, but they are not erased

I've been trying to make a pretty simple space shooter game with C++, and I have been having a lot of trouble trying to use lists to store enemies and bullets. Basically I followed the post here ...
610 views

### Undeviating bullet in AndEngine

I'm looking for a bullet that can collide with other bodies of the world but doesn't change direction according to collisions. I want the bullet to perform the collisions but without changing its own ...
303 views

### What is a technique for 2D ray-box intersection that is suitable for old console hardware?

I'm working on a Sega Genesis homebrew game (it has a 7mhz 68000 CPU). I'm looking for a way to find the intersection between a particle sprite and a background tile. Particles are represented as a ...
3k views

### SDL Bullet Movement

I'm currently working on my first space shooter, and I'm in the process of making my ship shoot some bullets/lasers. Unfortunately, I'm having a hard time getting the bullets to fly vertically. I'm a ...
936 views

### Calculating missile trajectory around orbits before shooting

I'm building a game with Unity3D. It's a Gravity Wars clone. Both player and AI turrets shoot missiles at each other (giving an Angle and a Power variables), trying not to crash missiles on planets. ...
969 views

### How to find which side of a collider has been hit from hit.normal?

In Unity3d, i can get the normal of the surface with which the collider collides using hit.normal, but is there a way to find which side has been hit what is provided bu Unity3d? One solution is to ...
4k views

### Solving for velocity in the x/y/z axes?

In a 3D environment I have an object with a displacement x that I know I need to traverse in a given time interval. I have the object's heading and elevation and I want to figure out the distance the ...
3k views

### How do I calculate the exit vectors of colliding projectiles?

I'm trying to create projectiles which bounce/ricochet off one another when they collide in mid-air. All projectiles are spherical and have identical size, mass, and speed. Each has two vectors: one ...
4k views

### How can I implement projectile motion like Angry Birds? [duplicate]

Possible Duplicate: Tracking Object Position - Firing on a Trajectory I need help in implementing the projectile motion in my game as was implemented in Angry Birds. Please help.
6k 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 - http://...
906 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 ...
1k views

### Physic of an arrow in flight

What are the formulas which represent the horizontal and vertical displacement of an arrow in flight (as well as it angle)? I would like to make sure that I take into consideration the arrow's fluid ...
4k views

### Projectile Motion - Arrow

In a 2D game, I simply want to draw the trajectory of an arrow in flight. With the code below, the trajectory (the parabola) looks right, but the angle (or rotation) or the arrow isn't. float g = -9....
2k views

### How to calculate turn heading to a missile?

I have a missile that is shot from a ship at an angle, the missile then turns towards the target in an arc with a given turn radius. How do I determine the point on the arc when I need to start ...
370 views

### How are trajectories calculated and transmitted to other players in Multi-Player?

I play alot of COD4. And can see tracers for gunfire, missles, care packages fall from helicopters etc. There is alot of activity. I am curious to know the algorithm (at a high level) that manages ...
22k 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 ...
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 ...
516 views

### Maximum range of projectile fired at given force and elevation

I've gone over this again and again, and my result is obviously wrong when viewed in-action. Here's the initial formula I converted (first one): http://en.wikipedia.org/wiki/Range_of_a_projectile ...
2k views

### Find meeting point of 2 objects in 2D, knowing (constant) speed and slope

I have a gun which fires a projectile that has to hit an enemy. The problem is that the gun has to be automatic, i.e. - choose the angle in which it has to shoot, so that the projectile hits the enemy ...
394 views

### Adding 'swerve' to a direction

I'm not much of a maths expert, so this is probably quite straight forward. I was playing a soccer flash game where you take free kicks. You provide Power, Swerve and Direction. I'm reading up on ...
266 views

### How do I change the speed of an object without changing path travelled?

I have a ball which is being thrown from one side of a 2D space to the other. The formula I am using for calculating the ball's position at any one point in time is: x = x0 + vx0*t y = y0 + vy0*t - 0....
342 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 ...
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 ...