Questions tagged [projectile]

A projectile refers to an object, point type or solid, that was launched into an orbit or ballistic trajectory and is typically traveling at high velocity.

A projectile refers to an object, point type or solid, that was launched into an orbit or ballistic trajectory and is typically traveling at high velocity.

252 questions
1
vote
1 answer

Solving coupled differential equations of quadratic drag

Goal I have been attempting to solve and plot the following coupled differential equation belonging to quadratic drag: The variables from the equations are defined as: c = 0.0004 m = 0.0027 starting position of projectile= (0,0.3) velocity on…
Shreyas fc
  • 25
  • 5
1
vote
2 answers

Find an angle to launch the projectile at to reach a specific point

So, Dani in his slightly new video -> "Making a Game, But I Only Have 3 Days" (https://youtu.be/S7Dl6ATRK2M) made a enemy which has a bow and arrow (at 5:39). I tried to recreate that but had no luck... I also can't find the website that he used...…
1
vote
1 answer

Make CircleCast stop once it hits something in Unity?

I am working on a game where a 2D projectile can ricochet off of walls. I currently have the object itself ricocheting just fine, however I would like an Angry Birds Style HUD (minus the gravity) that displays where the object is going to hit a…
Jhon Piper
  • 513
  • 2
  • 8
  • 21
1
vote
0 answers

Kalman filter usage to predict projectile trajectory that is facing camera

I'm trying to predict where thrown object will hit a ground, so I figure I need to predict it's path using Kalman filter to estimate future states of the projectile. The camera I'm using is Kinect v1, I'm using the depth camera to track the object…
1
vote
1 answer

the graphs of the two projectiles does not work properly when complementary angles(eg 30 and 60) are passes to xy_plot1 and xyplot2 function

import matplotlib.pyplot as plt import numpy as np import math import matplotlib.gridspec as gridspec from matplotlib.animation import FuncAnimation fig = plt.figure() plt.xlabel('X') plt.ylabel('Y') # limiting the y and x axis plt.ylim(0,…
sandy
  • 13
  • 2
1
vote
1 answer

Bukkit/Spigot - Projectile locations on hit detection completely wrong

I am making a custom 'gun' plugin for a minecraft server. My problem is that when attempting to detect where a projectile has landed, the locational difference between the projectile and the player being hit is too large to be detected by my…
1
vote
2 answers

Problem with writing code for projectile motion

I'm trying to write this code that calculates the final height and duration of flight for a projectile, while the user has to provide values for displacement, initial velocity, and launch angle. There aren't any compilation errors, but it's more of…
garageman
  • 25
  • 3
1
vote
1 answer

Python Animation of projectile giving straight line

The goal is to animate/simulate a sprinkler. The basic idea is to create multiple droplets at an instance, each exiting the sprinkler at a different angle. However, instead of having a point that moves along, I'm getting a straight, static line.…
marlise23
  • 73
  • 1
  • 1
  • 6
1
vote
0 answers

Game freezes for a second when player fires projectile in Sprite-kit

Game freezes for a second when the player fires the first bullet. I'm trying to create a space shooter in Xcode. This is code I'm using to move the bullet once the player taps the screen. func fireLaser() { if(!canFire) { return }…
Antwon Key
  • 63
  • 8
1
vote
2 answers

When at least one projectile out of a group hits the target, how to call a function only once per group?

When a shotgun fires a group of pellets, and let's say 1 or 20 pellets hit the target: how do I call a function only once per accurate shot, instead of once per pellet collision? When using OnCollisionEnter on the projectile or on the target itself,…
edwuxa
  • 40
  • 7
1
vote
2 answers

Python Space Invaders with PyGame Troubleshooting

I am working on a simple space invaders game with pygame and have been first creating classes for the different objects, or sprites, in my game. The goal right now is to create a character that can move back and forth on the x axis and shoot…
1
vote
1 answer

Trajectory of projectile slightly off Unity2D

I have a simple cannon I am trying to program to shoot a projectile. I have 4 game objects: The tank object A Pivot Object (child of tank) A Cannon Object (child of pivot) An empty GameObject called Tip which sits just above the cannon (child of…
Alex
  • 1,172
  • 11
  • 31
1
vote
0 answers

Projectile Trajectory : Reaching specific coordinates

I am trying to implement a function in my game which will auto-lock a target and throw a projectile so that it lands perfectly on it. I did the maths to calculate a parabola from Player 1 -> Target wherever their positions are but realised I wanted…
1
vote
1 answer

Finding Landing point

I am using addforce to throw object into the air, I want to instantiate a plane in position of landing point, how can I do that? I was thinking to calculate the landing point with Unity Physics API but I don't know how. I have tried some code about…
1
vote
1 answer

Projectile motion

I am supposed to write a script that provides multiple lines of projectile motion but my code doesn't seem to give me what I need. disp('This program will calculate the trajectory of a ball thrown at an initial speed vo \n') v0 = input('Please enter…
josh
  • 15
  • 5