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

How do I align bullets with a gun?

I have an image of my player (top-down 2D). The player rotates to face the camera, and holds a gun. When bullets are created, they are created at the player's x and y. This works when the player is facing the right way, but when the player rotates…
Shane
  • 25
  • 5
1
vote
2 answers

Projectile not working anymore. How can I reenable it?

When I start emacs now, prelude is no longer activated. This is my personal.el file: (setq-default tab-width 4) (setq tab-width 4) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up,…
Geo
  • 93,257
  • 117
  • 344
  • 520
1
vote
1 answer

Java 2d Shooting direction with mouse

My problem might be simple. I've spent most of today thinking of an algorithm(That will pretty probably be a couple if statements) that will determine the direction the mouse is pointing and shoot a bullet in that direction. I already tested the…
36redsoxfan
  • 250
  • 2
  • 5
  • 15
0
votes
1 answer

Making the bullet Fire -Cocos2d

My code has two Bullet-related classes. Bullet and BulletCache. The BulletCache creates a certain number of I have moved on to just creating a new bullet creating method meant to shoot off the bullets. I used the CCFuncN method but the game is…
GPP
  • 2,157
  • 3
  • 18
  • 26
0
votes
1 answer

How do I made shooting multiple bullets function correctly using a for loop?

I'm working on a prototype for a shmup game in C++ using SDL...Right now I'm just trying to get the basics working without using classes. Now, I have it so it shoots multiple bullets, but it behaves strangely which I believe is because of the way…
user1122136
  • 98
  • 2
  • 8
0
votes
1 answer

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 arrow moves towards the original position of the…
0
votes
0 answers

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 Bezier curves and parabolic motion, I think it is more like…
0
votes
0 answers

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 method get the one without drag and with drag. Hope…
yuki
  • 1
  • 2
0
votes
0 answers

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 float". Did I draw my circle wrong in a way? I am new…
Rey
  • 13
  • 3
0
votes
0 answers

Need help fixing movement updater when collision is detected for my block pygame

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 still merge together before they separate again.…
0
votes
0 answers

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 there a way to tell emacs or Projectile to default…
Matt
  • 25
  • 4
0
votes
0 answers

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 missing something. Heres my code for detecting the…
Jukeo
  • 1
0
votes
1 answer

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 new to programming and all tutorials on youtube…
0
votes
2 answers

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 the position vector, but i keep getting the error…
0
votes
0 answers

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 error I get: ValueError: not enough values to unpack…
rand111
  • 15
  • 3