Questions tagged [trajectory]

The path that a moving object follows through space as a function of time. It can be described mathematically either by the geometry of the path, or as the position of the object over time.

Filter by
Sorted by
Tagged with
0
votes
0answers
15 views

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

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 ...
1
vote
2answers
60 views

How to make a gameObject follow non trivial trajectories?

as the title of the question says, I was wondering if there is common method to make gameObjects e.g. enemies or bullets follow curvilinear trajectories before reaching their target. For instance, ...
0
votes
1answer
86 views

help with shooting projectile along a curve path

so i been trying to find a way to shoot projectiles along a curve path . and i found this tutorial on youtube which was really good. i also uploaded the project in case you wanted to check it out. ...
1
vote
0answers
59 views

Calculate velocity to hit the target on flat 2d surface

I am creating a game using Python and Pygame. I have used this function before (with JS with p5.js and Java with libwjgl, but for some reason it does not work with pygame (I am not sure if it matters ...
0
votes
1answer
80 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 ...
2
votes
2answers
2k views

Projectile Aim Prediction with Acceleration

I'm trying to solve the classic shoot moving object problem but with acceleration attached to that changes it from a quadratic to quartic formula but my math skills are not this good sadly as i prefer ...
0
votes
1answer
702 views

Required initial velocity (fixed launch angle) for projectile to hit a target

The scenario: I have an enemy tank (AI) chasing my friendly tank (player). When the enemy gets close enough he tries to shoot the player. Now the enemy prefab has an empty game object attached as a ...
2
votes
1answer
202 views

How can I move and rotate an object in an “infinity” or “figure 8” trajectory?

I know that the easiest way to move an object with the figure 8 trajectory is: x = cos(t); y = sin(2*t) / 2; but I just don't know how to rotate it, lets says ...
4
votes
1answer
234 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 ...
1
vote
2answers
377 views

How to calculate vector of projectile initial velocity

There are point A (origin) and point B (target). And also there is gravity vector G. I need compute initial velocity of projectile (throwing arc trajectory from point A to point B). Also I need to ...
1
vote
2answers
463 views

How to implement the missile trajectories in the classic missile command game - pygame

I am doing a clone of the classic arcade game missile command, i am curious about how to implement the trajectories of the missiles. I have a solution that looks pretty similar to the original game, ...
1
vote
1answer
445 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 ...
2
votes
1answer
598 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 ...
1
vote
1answer
467 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 ...
1
vote
1answer
158 views

How do you convert angle with velocity to x velocity and y velocity?

This question can be simplified to: If you lean a pencil of a certain length at a certain angle what is the x and y position of the tip? So, basically, I am making a game that plots a balls path ...
1
vote
1answer
207 views

How do I take 2D ballistic trajectory planning and apply it to 3D?

I am currently using this formula speed = sqrt((gravity.y*target.x^2)/(2*cos^2(angle)*(target.y - target.x*tan(angle))) provided by DMGregory as an answer for my ...
1
vote
1answer
1k 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
1answer
2k views

Displaying Trajectory Path [closed]

How can I display trajectory path exactly as in this image? I have used void OnDrawGizmos, but that only displays trajectory in the editor and without any arrows ...
2
votes
2answers
1k 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 ...
9
votes
3answers
3k 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^...
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 ...
2
votes
0answers
2k views

In Unity, how do I make a 3D flight arc preview?

I'm stuck on how to make a preview trajectory for a projectile appear when holding a button. The trajectory should start at a certain position on the scene and end wherever the player points their ...
1
vote
3answers
507 views

Projectile Rotation During Flight (Tank Game)

I have a tank firing projectiles into the air. I want the projectiles to be rotated relative to their position along their flight path. See the diagram I drew in the image below. At any given point ...
1
vote
1answer
71 views

How can I create a parabola that does not use negative X coordinates

I am currently devloping my first javascript program ever which is a table tennis game. I am trying to create trajectory for the ball to follow when hit - just a very basic parabola. However im not ...
0
votes
2answers
224 views

How to get a turret to shoot at player in a shmup

I'm developing a basic vertical shoot em up on the DS and am trying to get stationary turrets to shoot at the player in a shoot em up. Early on I simply had them shooting in fixed 8 directions N, S, E ...
3
votes
1answer
2k views

How to rotate an object along its trajectory path?

I have a missile launcher that uses initial velocity for the trajectory. I edit the launch angle from the editor, and then the script calculates the initial velocity required to land the missile to ...
0
votes
3answers
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: ...
1
vote
2answers
201 views

Adding gravity to arrival steering behavior

I trying to write an autopilot for the classic Lunar Lander or its clones. According to this paper, the arrival behavior is exactly what I need for a soft landing. In this example, it accelerates at ...
-1
votes
1answer
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 ...
2
votes
3answers
2k 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 ...
1
vote
1answer
241 views

Lunar lander: why is my descent module crashing

I've been reading this awesome simulation of the actual Apollo 17 descent: http://www.braeunig.us/apollo/LM-descent.htm I've been trying to make my own simulation using Euler integration, with a time ...
1
vote
1answer
954 views

Lunar lander: How to calc acceleration in each step

I'm trying to make a lunar lander simulator. I'm going to use a simple Euler integration. AFAIK all I've to calculate is the acceleration in each step, and then I should be able to update velocity and ...
4
votes
5answers
2k views

Goalkeeper Jumping Algorithm?

This may be a "best way to" question, so may be susceptible to opinion-based answers (which is ok for me). But I would also like if there are any tutorials , research papers , etc. I'm trying to make ...
2
votes
1answer
5k views

Calculating trajectory

I'm just starting with game development and some physics related to that. Basically I want to calculate a trajectory given an initial velocity and as well as an elevation / angle. So I wrote this code ...
1
vote
1answer
141 views

Translation over a vector trajectory

I'm working on a particle field system, where the particles can go from a point of the map, to another point of the map, using an angle (with sin and cos). By now, I can calculate the vector by ...
1
vote
1answer
192 views

How do I have an arrow follow different height parabolas depending on how long the player holds down a key?

i'm trying to throw an arrow in my game, but i'm having a hard time trying to realize how to make a good parabola. What I need: The more you hold "enter" stronger the arrow goes. The arrow angle will ...
1
vote
0answers
166 views

Particle trajectory smoothing: where to do the simulation?

I have a particle system in which I have particles that are moving to a target and the new targets are received via network. The list of new target are some noisy coordinates of a moving target stored ...
5
votes
2answers
686 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.)
9
votes
2answers
34k 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 ...
3
votes
2answers
274 views

How do I find realistic 3D paths for stable and unstable flying rockets?

I am building a 3D application that simulates launching small rockets. I want to draw their trajectories. I know that rockets have a degree of stability. I want to include this in the simulation, but ...
28
votes
4answers
10k views

How can I move an object in an “infinity” or “figure 8” trajectory?

When I want to move object around point I do: point.x *= cosf(timer.timeElapsed); point.y *= sinf(timer.timeElapsed); How to make point move on eight or ...
8
votes
1answer
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 ...
1
vote
2answers
832 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 ...
1
vote
0answers
579 views

Calculate initial velocity of a 3d vector-based projectile

Okay, so I got a Projectile with 2 Vectors, position and velocity. I now want to calculate the initial velocity for it in order to reach a specific point on the map. Or actually, how high has the ...
10
votes
4answers
1k 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. ...
21
votes
3answers
5k views

How does one avoid the “staircase effect” in pixel art motion?

I am rendering sprites at exact pixel coordinates to avoid the blurring effect caused by antialiasing (the sprites are pixel-art and would look awful if filtered). However, since the movement of the ...
8
votes
1answer
1k views

Projected trajectory of a vehicle?

In the game I am developing, I have to calculate if my vehicle (1) which in the example is travelling north with a speed V, can reach its target (2). The example depict the problem from atop: There ...
5
votes
2answers
1k 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 ...