Friday, April 12, 2024
HomeGame Developmentphysics - Easy methods to Lead a Goal if the projectile inherits...

physics – Easy methods to Lead a Goal if the projectile inherits the shooter’s pace?

This query is about what coordinates to shoot at on a 2D aircraft given the shooter and goal positions, their fixed velocities, and projectile pace. This has been solved many occasions however I’ve but to discover a resolution that works if the projectiles inherit the shooter’s velocity.

I discovered one publish that describes this clearly: “My downside is that when the gun strikes, the magnitude of the projectile pace would fluctuate as a operate of the angle you shoot at, as a result of it will inherit the gun’s velocity vector (fixed angle) plus its personal velocity (on the angle to goal) so to calculate the gun’s velocity magnitude I might must have already got the angle I am on the lookout for.”

The next options work when the shooter is stationary:
Extra specific resolution –
Extra concise resolution –

However they do not work if the shooter is transferring. When capturing forwards it will overshoot the goal, and when capturing backwards it will not make it to the goal.

There are some replies to the publish, of which I solely understood I want to make use of relative positions and velocities, which is already utilizing.



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments

Arnavsijapati on Planet of Lana – Beta Demo
Jai Kishor Upadhyay on Planet of Lana – Beta Demo