# Tag Info

Accepted

### How can I launch a GameObject at a target if I am given everything except for its launch angle?

I'm a bit skeptical of using atan here, because the tangent ratio shoots off to infinity at certain angles, and may lead to numerical errors (even outside of the ...
Accepted

### Why aren't game bullets implemented as if they were real bullets?

The main problem is tunneling. Game physics engines typically use discrete collisions. That means they advance all the bodies by one short time step, then check if they're intersecting, and handle ...
Accepted

### Projectile Aim Prediction with Acceleration

To make things a little simpler, let's work within the inertial frame of our launcher. That means our projectile will be firing from the point (0, 0, 0). (You can subtract any arbitrary firing ...
Accepted

### Guided Missile with Constant Time

The edit is reassuring. :) Okay, here's a straightforward update loop... Assuming when we fire the missile we initialize remainingFlightTime = 5f then... ...
Accepted

Accepted

### How to make mouse pointer be the vertex of a drawn parabola when estimating the trajectory of a projectile?

I think we can do this more simply. This demo uses about 80 lines of code (the interesting ones being just the dozen below), instead of over 300, with no angles/trigonometry functions needed: At the ...
Accepted

### Calculate initial velocity for trajectory given duration, launch angle, and distance

Note: the situation you describe (angle, start, end, and time of flight) is overdetermined. For many (most) inputs, there will be no solution that simultaneously satisfies all of these constraints. (...

### How can I launch a GameObject at a target if I am given everything except for its launch angle?

I modified DMGregory and Evorlor's solution a bit as I wanted a 3D arc and wanted to be able to apply a minimum speed if the provided speed wouldn't reach. ...
Accepted

### Required initial velocity (fixed launch angle) for projectile to hit a target

[Reposted as an answer, at the asker's request] turretAngle is in degrees, so you need to convert it to radians before passing it to ...

### Why aren't game bullets implemented as if they were real bullets?

For most games it doesn't make a difference. Take the Counter Strike series, for example. It simulates firearms combat on rather short distances. On the distances where the average CS shootout takes ...
Accepted

### Rifle bullets/projectiles in Unity, raycasting or rigidbody?

A simple raycasting would be instantaneous. This is usually referred to as Hitscan. A simple example would be in Doom, some weapons and enemies hit immediately while others can be dodged after they ...
Accepted

### how to calculate initial Y velocity required to reach target?

You are going to need to use the Equations of Motion. This is because the velocity is not constant over the time frame. You cannot calculate distance traveled by velocity and time alone. One way to ...

### Pushing Rigidbody forward doesn't go straight

Those calculations you made are taking into account a direction that is forward of the camera center. But you are instanciating the grenade in an arbitrary transform called ShootPoint. so how to ...

### Javelin throw projectile motion

maybe you should position the javelin in such a way, that the 'nose' of the javelin is where the curve is, not in the middle, that way it might look a little 'more natural'. or you can add a turning ...
Accepted

### How do I launch a ballistic projectile to hit a moving target, given: launch position & angle, target position & velocity?

I'm assuming that your gravity acts on the vertical axis, and that your launch angle is an altitude (measured vertically from the horizon, so 0° means firing horizontally, and 90° means firing ...