258
questions
-4
votes
0
answers
25
views
Projectile Motion of Baseball [closed]
Some children are practicing baseball and accidentally throw a ball onto the roof of one of their houses. Suppose that the baseball was thrown at an angle of 53 ° above the horizontal at a speed of 23 ...
0
votes
0
answers
47
views
Why does my onHitEntity only fire sometimes? Minecraft forge net.minecraftforge:forge:1.20-46.0.12
I created a drone in minecraft and gave it some goals which it executes well. Currently I'm having an issue that i cannot for the life of me figure out. so the drone currently shoots an arrow. the ...
0
votes
1
answer
64
views
Tips for improving the look of projectiles in Unity
Is there some better way of instantiating simple projectiles in Unity so that they look better (esp while moving). Currently, it looks like this for me (blue marks player's move direction, yellow ...
0
votes
1
answer
82
views
Spacemacs mode commands give error in projectile
When I try to run mode commands (such as "start Repl", "send buffer") in ESS(R) mode in Spacemacs within a projectile, I get the following error:
"No applicable method: ...
-1
votes
2
answers
56
views
shooting projectile in the same direction the player faces
so i want to shoot a prefab projectile in the same direction the player faces. i keep looking for different ways to add velocity or force but it never "goes"
i have a weapon position thats ...
0
votes
2
answers
105
views
Referencing an appended list with user generated class objects from definition within a class?
I want to create a class Ball, and make a list of objects generated by user for that class. I will then reference this list in run() to draw user generated objects in pygame. My problems are as ...
0
votes
0
answers
26
views
Why isn't my projectile object being instantiated with the given values?
In this game, this crystal ball finds the closest enemy and sets it as a "target." Once the target is within a certain distance, it's supposed to start firing bolts.
Everything is working up ...
0
votes
0
answers
25
views
How to aim a balistic projectile at a moving target?
i have:
the target speed and position
the gravity
the firing point
i need to calculate where i should launch the projectile to hit the target 100% of the time in 3D
i found lots of solutions for ...
0
votes
0
answers
20
views
Object Pooling Problem in Tower Defense Game
I'm trying to make a tower defense game and I'm new to programming. I try to implement Object Pooling for placing towers, showing towers when hovering (when you hover your mouse over a tile it shows a ...
0
votes
1
answer
25
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
106
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
476
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 ...
-1
votes
1
answer
75
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
33
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 ...
1
vote
0
answers
73
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
50
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
818
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
118
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
147
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
382
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
138
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
451
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
776
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
424
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
149
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
555
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
468
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
123
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
1k
views
Firing projectile in 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
128
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
122
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
261
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
428
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
768
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
57
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
592
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
3k
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
553
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
1k
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
516
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
4k
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
586
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
1k
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
196
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
1k
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
365
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
976
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
47
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
59
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:
...