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
2 answers

C# Projectile Simulator - Applying Speed to X Position of Projectile Physics

First of all, here is the code: decimal gravity = decimal.Parse(gforce.Text) / 1000; decimal speed = decimal.Parse(initialSpeed.Text) / 1000; decimal newAngle = DegreesToRadians(decimal.Parse(angle.Text)); double…
Nicholas Ramsay
  • 465
  • 2
  • 16
1
vote
0 answers

Phaser-Projectiles being affected by gravity

I set gravity to 1000 in the create function like so : game.physics.arcade.gravity.y = 1000; But then when I intergraded projectiles in its own function: function shootr(){ if (canshoot) { if (attackTimer< game.time.now) { …
Florin Gusa
  • 63
  • 1
  • 6
1
vote
2 answers

Firing projectiles in a circle

So I can't seem to find an answer to this, but I am trying to fire bullets into a circle. I have a simple class for a circular path that I attach to a bullet and it reads from that class a position when given a time value. The bullet simply…
matt murray
  • 233
  • 2
  • 12
1
vote
0 answers

why helm-projectile-recentf set current buffer as default

I'm trying move from ido-mode to helm and projectile and are not used to, something will be overcome, but when I tried helm-projectile-recentf, I wish it can switch to last buffer I visited quickly, but the default buffer is my current buffer, I…
netawater
  • 15,214
  • 4
  • 24
  • 21
1
vote
1 answer

Collision issue with Java Game

I am making a little Java Game for practice. Since changing up sprites and what not I am having problems with collision between Enemy and Projectiles. I will provide the Projectile class and can provide more if anyone would like to look! Help would…
1
vote
1 answer

Rotate object towards another object - C# Unity

I want object, when spawned, to turn and travel towards my enemy object. I've already got the travel working but the rotation towards the enemy doesn't seem to work. Here's my current code: GameObject newRocket =…
M. Dvoracek
  • 11
  • 1
  • 3
1
vote
1 answer

Calculating bullet speed

I need to calculate X and Y speed for bullet (bullet will move every "update" by these), so i have following public int[] getXandYSpeed(int pointOfOriginX, int pointOfOriginY, int aimToX, int aimToY){ int[] coords = new int[2]; aimToX = aimToX -…
Meowxiik
  • 13
  • 6
1
vote
2 answers

How to get smoother 2d projectile physics

So I want to start working on a 2D platforming game, and I won't be in physics till next year, so I found the equations in an old physics book I had to help be find the x and y positions along with their velocities. The problem is, they seem to…
MagnusCaligo
  • 707
  • 2
  • 8
  • 28
1
vote
1 answer

Projectiles Lagging, Not Fully Being Deleted

For me this bug is game breaking, I am using four different Lists that control rockets that shoot out of many launchers. The launchers are also held in a list: Launchers = new List(); RocketsUp = new List(); …
Ryan Foy
  • 322
  • 6
  • 19
1
vote
2 answers

Make projectile transition to edge of screen

I've tried googling this however the tutorials only tell you how to make a projectile transition to a certain target.In my case I want it to travel towards the target but then carry on until the edge of the screen. This is my current shoot…
Oliver Bennett
  • 157
  • 1
  • 2
  • 14
1
vote
1 answer

Generate projectile motion by specifying coordinates

I want to plot one half, the positive increasing half, of a projectile motion passing through a specified coordinate on the y axis say till the apex of the midpoint or mean of the motion.For example, by specifying the coordinates starting from (0,0)…
user1142671
  • 115
  • 1
  • 13
1
vote
1 answer

Shooting a projectile in unity always return null exception

So I'm currently working on my game project using unity3D and I came across this weird error. I'm trying to instantiate and shoot a projectile forward. here's my Update code: if (Input.GetButtonUp("Fire1")){ Vector3 frontDir =…
1
vote
2 answers

How can I get my ship to fire multiple shots?

Ok so I'm working on this project for school. I'm supposed to make a space invader type of game. I have finished making my ship to move and fire shots. Now here's the problem, when I try to multi-fire, it erases the previous bullet that was fired…
1
vote
1 answer

C++ Projectile Trajectory

I am using OpenGL to create the 3D space. I have a spaceship which can fire lasers. Up until now I have had it so that the lasers will simply to deeper into the Z-axis once fired. But I am attempting to make a proper aiming system with crosshairs so…
Saiaku
  • 57
  • 2
  • 6
1
vote
1 answer

Implementing gravity to projectile - delta time issue

I'm trying to implement a simple projectile motion in Android (with openGL). And I want to add gravity to my world to simulate a ball's dropping realistically. I simply update my renderer with a delta time which is calculated by: float deltaTime…
Murat Nafiz
  • 1,438
  • 17
  • 28