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.
252
questions
0
votes
1
answer
19
views
projectile not moving towards the player character
I am making an archer enemy in my unity game, and ive worked out a script so that the arrow moves towards the direction of the player. However every time the archer shoots the arrow (Instantiate), the ...
0
votes
0
answers
68
views
Can't understand the math and physics behind throwing grenades in games
I'm digging in unity tutorial "3DGameKit". when a game monster shot a grenade, call the function GetVelocity() to set rigid body's velocity. In order to figure out this function,I studied ...
1
vote
3
answers
196
views
Unity C# 2D Platform game - Projectile doesn't shoot into the direction the player is facing
As the title describes, I am trying to make my projectile go into the direction the player is facing. Currently the projectile only shoots towards the right, even if the player is facing left.
*** I ...
0
votes
0
answers
20
views
How do I use maple to approximate the oblique throw (projectile motion) with drag and without?
The equation i've come toMy maple document showcase
Essentially I would like to use Eulers method to approximate the solution curve and compare the two. See how close i can get. How close Eulers ...
-1
votes
1
answer
50
views
How to fire on Mouse Button?
I'm trying to do my first platformer at Unity. And have some problem with projectile. I found a tutorial, how create a projectile moving, but without trigger on Fire button. It is possible to change ...
0
votes
0
answers
29
views
Projectile Motion Simulation is crashing whenever I right or left click due to it getting an "integer argument expected, got float" What do I do?
Whenever I right or left click the program instantly closes and shows the error "line 87, in update
pygame.draw.circle(win, self.color, self.path[-1], 5)
TypeError: integer argument expected, got ...
0
votes
0
answers
30
views
Need help fixing movement updater when collision is detected for my block pygame [duplicate]
The code currently works as intended except for the enemy updater function, it is only okayish. I dont have a problem detecting collision my problem is updating the enemy's positions based on it, some ...
0
votes
0
answers
37
views
How can I make emacs and/or Projectile recognize external C/C++ defines (e.g. in the makefile)?
My project has a number of defines configured in build scripts. Because emacs isn't aware of them, hide-ifdefs collapses sections that should be visible and find-definitions misses some targets.
Is ...
1
vote
0
answers
47
views
How do I alter my code so that the projectile is able to move? (using python and tkinter)
Seen below is the code i have written for a maze game where the user controls a green square which they move around the maze using wasd, where they also have a projectile they can shoot using M1 and ...
1
vote
1
answer
39
views
OnTriggerEnter2D not working for my enemy health system
I have a projectile and an enemy, but I want the enemy to decrease the heath variable when it touches the projectile.
I tried to shoot projectiles but it did not decrease the health.
`using System....
0
votes
0
answers
473
views
OverlapBox sometimes not working as expected, Unity 2d
I am using an overlap box to detect whether an arrow hits the ground or an enemy, the arrow hitting the enemy works, it's that often the arrow will just pass through the ground, not sure if I am ...
0
votes
1
answer
80
views
Is there a way to script projectile gravity without using rigidbody components in Unity2D?
Is there any way to script projectiles in Unity2D using c# without the rigidbody gravity components automatically set in place by unity. I know it has something to do with transform/raycasts but I am ...
0
votes
2
answers
121
views
trying to plot position vector within loop
I've been trying to code projectile motion and everything has been working so far except the graphing portion, which i'm trying to iterate within the loop. I want to graph the x and y coordinate of ...
1
vote
2
answers
289
views
Roblox: Touched event returns incorrect position of projectile
I've made a cannon in Roblox, it uses part velocity to launch cannon ball projectiles out the cannon. It attaches a function to the touched event for the cannon ball that's taken from server storage ...
3
votes
2
answers
107
views
My projectile system not working, what's wrong with it, how can I fix it?
I'm making an asteroid shooter system, that can shoot projectiles where the player is facing, however, when you shoot (press space), the projectile does not move.
I've tried to add cosine and sine to ...
0
votes
0
answers
310
views
Projectile motion 3d odes
I am trying to solve this set of differential equations with solve_ivp in Python. Winds are horizontal two dimensional vectors, so I need differential equation solved in y dimension.
This is the ...
1
vote
1
answer
415
views
In Unity 3D, Why Destroy(gameObject) doesn't work here?
I'm making a 3rd person shooter and currently working on projectiles. My projectiles are rigidbodies, and when they are instantiated, they instantiate a geometry according to the weapon used.
Anyway, ...
0
votes
2
answers
309
views
Vertical projectile motion, finding interersection with moving target
I am writing an aimbot script for my AI, I am a bit confused about how to get the vertical projectile motion formulas to help me find the time and initial velocity required to fire the projectile at ...
0
votes
1
answer
98
views
How Do I Make Enemies In My Game Shoot Missles randomnly?
So I'm trying to create space Invaders currently and i'm trying to make the aliens shoot at the player randomnly. I've made it so that one projectile or enemy missle is shot at the player, but I can't ...
0
votes
1
answer
449
views
3D Isometric game in Unity - Projectile follows player movements
I'm trying to make a 3D Isometric game with a wizard shooting fireballs. I managed to make it shoot the fireball but they go in the direction which the wizard is facing: if I rotate the wizard the ...
0
votes
2
answers
392
views
Projectile shotgun in unity: inconsistent spread
I am trying to make a shooter with a shotgun that is projectile based. However, at certain angles the spread changes from what it should be, im guessing due to the variation in transform. Forward. Is ...
0
votes
1
answer
96
views
How to fix "projectile-find-implementation-or-test: No matching test file found for project type ‘haskell-stack’" in enh-ruby-mode?
I'm currently experiencing a weird behavior in projectile while working on a typical Rails project. Long time projectile user but this is the first time I see it:
projectile-find-implementation-or-...
1
vote
3
answers
963
views
Firing projectile unity 2d
I am trying to make the character fire some waves through the weapon when you click the mouse button, but somehow the waves (projectiles) are not showing in the screen even though the hierarchy shows ...
0
votes
1
answer
104
views
How to detect a custom Crossbow in mainhand?
I am trying to detect the crossbow in the players hand (it is a cutom item), but only the bow (also a custom item) seems to be working the way I have it set up right now. Only the bow will show "...
0
votes
1
answer
79
views
How to adjust my basketball-FT(Free throw) simulation to find the necessary torque(s) on joints
I'm working on a simulation of a basketball throw which starts with a angular motion and passes into a projectile motion. Physics set-up of simulation
My goal is to get insights on the amount of ...
0
votes
0
answers
183
views
Calculating gravity velocity over a given distance and time
I'll just start by saying I'm looking at the "projectile" code found in the game "Runescape" originally wrote in Javascript. The original code can be found somewhere half way down ...
0
votes
2
answers
243
views
How do I store a multidimensional array?
I am trying to write a code in python that will display the trajectory of projectile on a 2D graph. The initial velocity and launch angle will be varying. Instead of calculating it every time, I was ...
0
votes
0
answers
532
views
unreal engine C++ / Calculate Movement Angle from projectile
I want to Calculate the Movement Angle an NOT the Rotation from an Moving Actor (to be specific = from a Bullet). First of, I´ve got the Location of the Actor and the Location one Frame before, then ...
0
votes
1
answer
51
views
Python 3.9.0 - Physics simulation of drag working abnormally
def CalculateAcceleration(self):
currentTheta = math.atan(self.velocity[1]/self.velocity[0])
currentSquaredVelocity = math.pow(self.velocity[0],2)+math.pow(self.velocity[1],2)
...
0
votes
1
answer
495
views
Projectiles not moving, and not starting from the player (Unity 2D / C#)
INFO
So I am trying to make a top-down endless arena battle game, where your shield acts also as your means of offense. The shield should spawn infront of the player, and stay infront as the player ...
1
vote
2
answers
1k
views
Unity 3D- The "Is Trigger" Under Sphere Collider Is not allowing my fireball/projectile to fly
I am reading this book about Unity (dated 2018) and it instructed me to click on that "Is Trigger?" box under the Sphere Collider section of the Inspector.
When I don't click it, the ...
1
vote
1
answer
2k
views
How do you fire a projectile that follows along a curved angle
I want one of my projectiles to follow an arching path before hitting the target. No matter how much I think about it, I just can't wrap my head around it. Any help would be grateful
1
vote
0
answers
535
views
Fire projectiles in the direction the player is lookin at in Unity3D Fps Microgame template
I'm modding the FPS Microgame Template project in Unity, which is a First Person Shooter game template available for free at the Unity Asset Store. The gun that comes with this template fires ...
1
vote
1
answer
945
views
Unity - emit particles to target position (with gravity)
I created a particle effect with parabolic movement just like the arrow projectile, is there any way to predict the particles start speed so that I can control which position they will fall on to ?
0
votes
0
answers
416
views
I want to animate the trajectory of a ball (really just a circle) using Matplotlib animation
I want to animate the trajectory of a circle (ball) defined by y = -t^2 + 11t - 18. Basically it would just be bouncing up and down (i.e. no change in x). Its intercepts are (2,0) and (9,0) so the ...
0
votes
2
answers
3k
views
Instantiating a prefab and then adding a force to it (Projectile) - Unity
I'm trying to add a force to the Rigidbody component of an instantiated projectile in Unity. I want to use this method as it is a simple throw mechanic and I just want the projectile to move in a ...
0
votes
2
answers
497
views
Three.js - How to calculate a projectile's angle and ballistics?
I'm using FlyControls.js for my camera view
I'm trying to add a projectile to my object
The projectile should use the angles from camera position, to crosshair/reticle position, and flow freely ...
1
vote
2
answers
715
views
How can I keep my projectiles direction constant after it is fired
I am making a simple platformer in Godot to learn to code and learn the engine.
I have a "Bullet" scene which looks like this:
extends Area2D
const SPEED = 100
var velocity = Vector2.ZERO
...
0
votes
1
answer
135
views
Walking on projectiles bullets, not colliding but player jumps on them due to step offset
Title says it all, the projectiles only hit the player and disappear if the player is standing still, if he is moving, the player will ''jump'' on top of the bullets and walk over them, not triggering ...
0
votes
1
answer
827
views
Projectile motion: Results show big difference between the line with air resistance and the one without it
I'm simulating the projectile motions with python on Spyder, one with air resistance and one without it. I started off by following this exercise.
It has guided me to do the projectile motion with air ...
1
vote
1
answer
287
views
How to make the data of my angles appear in a degree form?
I'm simulating projectile motion with python and there's one thing I need help with. As I use plt.legend() to show the angles corresponded to each lines(on the upper right corner of my graph), they ...
0
votes
1
answer
838
views
Python coding: create a new "class" to calculate motion of a projectile
I'm working on a project to create a new "class" in python to do some kinematics calculations.
But, I'm having trouble seeing how to build the formula in python given the common physics ...
1
vote
1
answer
46
views
Character Looks the Other way when jumping, and projectiles also come out the other way
if there is anyone who would be willing to help me with two simple problems (which I annoyingly can't find the solution to), I would be forever grateful. I've tried several solutions from the internet ...
2
votes
1
answer
55
views
How to make a condition to terminate appending?
I am writing a code to plot several projectile trajectories of various theta values in Python.
theta = np.arange(np.pi/6, np.pi/3)
t = np.linspace(0,2,num=100)
while y0>=0:
for i in theta:
...
1
vote
1
answer
319
views
Shooting multiple projectiles in pygame [duplicate]
I have a Missile class that gets the Player's position when the spacebar is pressed. .fire() uses this position to shoot a missile. It only shoots one at a time, how would I shoot multiple? I heard ...
0
votes
1
answer
380
views
Emacs: projectile-toggle-between-implementation-and-test for TypeScript spec file discovery
I really enjoyed using this projectile function in other languages but I'm currently having a hard time trying to figure out a way to set it for a typical TypeScript project.
ls services/
foo.service....
2
votes
2
answers
522
views
How to move multiple objects in pygame without affecting the motion of other objects(without delay)
In the code I have simply tried to make two objects move and one shoots. But as soon as one shoots the two stops moving until the bullet has reached the end. Is there a way to shoot bullets and move ...
1
vote
0
answers
952
views
Find an angle and velocity to launch the projectile with to reach a specific point
I am trying to make a cannon that shoots a target located in a 3D world in Unity... I hava a LaunchConfig enum ->
public enum LauncherConfig
{
CalculateNone = 0,
CalculateAngle = 1,
...
3
votes
1
answer
972
views
Emacs - How to automate adding new projects in BOTH - projectile and treemacs?
My workflow of using Emacs involve checking of many different projects. They are added and removed pretty frequently. This is very annoying and time consuming at the moment:
projectile-add-known-...
1
vote
1
answer
449
views
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
...