Author Topic: Does anyone know the formula for leading a shot?  (Read 1387 times)

Basically, I was wondering so I could make a robot that can lead a shot in robocode.

The only variables I have are Direction, Distance, and Velocity.
Wind and gravity are out of the question.
« Last Edit: April 15, 2012, 06:02:47 PM by JamestheLeet »

Leading a shot? Like firing a gun?

Depends on a lot of factors. Gravity, Earth's rotation (yes you have to compensate for that), yada yada yada.

Leading a shot? Like firing a gun?

Depends on a lot of factors. Gravity, Earth's rotation (yes you have to compensate for that), yada yada yada.
Minus wind, rotation of earth, gravity, pretty much just Velocity of the object, direction of the object, and distance of the object are the only needed factors.

I'm sorry, but what is Robocode?

It sounds cool.

I'm sorry, but what is Robocode?

It sounds cool.
http://forum.blockland.us/index.php?topic=191886.0
I made a topic for it.
Basically, code robots out of javascript and then pit bots against bots.

http://forum.blockland.us/index.php?topic=191886.0
I made a topic for it.
Basically, code robots out of javascript and then pit bots against bots.
So it let's you make robots while teaching you how to code?

Sounds epic.

Minus wind, rotation of earth, gravity, pretty much just Velocity of the object, direction of the object, and distance of the object are the only needed factors.
http://forum.blockland.us/index.php?topic=191886.0
I made a topic for it.
Basically, code robots out of javascript and then pit bots against bots.

Oh it's a 2D game thing. I thought you were engineering a robot.

Oh it's a 2D game thing. I thought you were engineering a robot.
Yeah
I probably should have added that in the op.
Actually I'm going to do that now.


What Keonesan said, the only real required variables for leading a shot are the ones he listed, Velocity, direction and distance of the object are all that matter

What Keonesan said, the only real required variables for leading a shot are the ones he listed, Velocity, direction and distance of the object are all that matter
I said that, keonesan was talking about a real weapon, in the real world.

But, can anyone provide me an equation/formula that i can plug the variables in to get where the robot should shoot at.