@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
12 lines • 950 B
TypeScript
/**
* Given position of the source point, and target moving at a constant velocity, compute intercept.
* Simple example would be {@link target} being enemy running, and {@link source} being position of our archer, given that the arrow speed is {@link sourceSpeed}, where should the archer aim at in order to hit the moving target?
* @param {Vector3} result This is where the intercept point will be written if solution is found
* @param {Vector3} source Where to launch a projectile from
* @param {Vector3} target Where the target currently is
* @param {Vector3} targetVelocity Target's current velocity vector
* @param {number} sourceSpeed Speed of the projectile in question
* @return {boolean} true iff there is at least one real solution
*/
export function computeInterceptPoint(result: Vector3, source: Vector3, target: Vector3, targetVelocity: Vector3, sourceSpeed: number): boolean;
//# sourceMappingURL=computeInterceptPoint.d.ts.map