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
votes
1 answer

Unity: My enemy projectile is being destroyed before ever leaving it's spawn location. What am i doing wrong?

Like the title says, the enemy projectiles are not launching. They are spawned and destroyed in the same place. They do not fire toward the target. Code in link: using System.Collections; using System.Collections.Generic; using UnityEngine; public…
ghDev
  • 11
-1
votes
1 answer

making a UIimage move every 1 second

I have a UIimage which I want to move according to X and Y given by certain equations ( physics projectile time equations) and I want it to move every 1 second so that it would appear to the user as if it's actually moving not just disappearing and…
Ace
  • 33
  • 4
-1
votes
2 answers

How to calculate force of air resistance in 2D projectile motion - Computational Science in C#

I am writing a program that will output a table of various stats on a 100th of a second interval of throwing a ball at a specific angle with a specific initial speed. I am having trouble calculating the air resistance. I have my Code below. Level 1…
D3sast3r
  • 1
  • 3
-1
votes
3 answers

Unity - Shooting at your crosshair even if there is no ray hit?

I am creating a first person shooter script. In order to get the bullet to travel straight at the cross-hair, I calculate the ray hit and shoot the bullet in that direction. The problem is if there is nothing within the range, it won't shoot at all,…
Kyle Jensen
  • 419
  • 9
  • 27
-1
votes
1 answer

Calculate time to reach top of the trajectory of a projectile

I have below information like gravity, thrust, my initial x, y and initial velocities. How do I calculate 1. Time to reach the top of the projectile 2. Horizontal displacement during that time "grav": 0.7, "thrust": 10.5, "me": { "x": 0, …
Manali
  • 128
  • 14
-1
votes
1 answer

Exploding Runge Kutta Method

I've been attempting to build a Runge Kutta fourth order integrator to model simple projectile motion. My code is as follows double rc4(double initState, double (*eqn)(double,double),double now,double dt) { double k1 = eqn(initState,now); …
user3277807
  • 63
  • 1
  • 1
  • 11
-1
votes
1 answer

How to calculate projectile motion with unit directional vector

i have already found the math for dealing with projectile motion but the different with mine was the directional vector and time provided. In my code , my directional vector was -1 to 1 and time was an interval time. How do I use those vector and…
LittleFunny
  • 8,155
  • 15
  • 87
  • 198
-2
votes
1 answer

My code does exactly what it has to do, but i have no idea why

is supposed to calculate the coordinates of a projectile launched with respect to time (steps of 100ms), with a linear equation, and it outputs linear numbers, but if i plot this equation with CalcMe.com (math tool) it makes a parabolic plot InVel =…
arf20
  • 15
  • 1
  • 5
-2
votes
2 answers

cannon projectile program using c programming

I am making a program that let's users enter velocity and angle and then program calculates the vertical and horizontal component and now i am trying to make the program also calculate time of flight (TOF). The equation is t=2*Vo*sin(ang)/g. but i…
-3
votes
3 answers

Bullets not showing up when trying to fire in pygame

I have a problem with my code where I have space assigned to create a bullet then fire it and update it to the screen. What's the problem? import pygame, random, os, sys pygame.init() pygame.mixer.pre_init(441100, -16, 2,…
HKVariant
  • 837
  • 10
  • 23
-3
votes
2 answers

Bukkit - Low Velocity Snowballs

everyone. I'm having a little trouble with launching snowballs. I'm working on a plugin where, while a user is holding a snowball, they can sneak to charge a power bar. The player has a scoreboard in the side_bar that has a "power bar" that goes up…
tboneblaze
  • 21
  • 1
  • 1
  • 7
-4
votes
1 answer

Implementation of Runge Kutta Fourth Order in c++

So I should start by saying that this is my first attempt a executable script, and my first ever c++ script. Bearing this in my mind my problem is as follows. I'm attempting to create a script which shall integrate projectile motion with the use of…
user3277807
  • 63
  • 1
  • 1
  • 11
1 2 3
16
17