computeInterceptPoint
Constants
- q_roots :
Array.<number>
Functions
Given position of the source point, and target moving at a constant velocity, compute intercept. Simple example would be target being enemy running, and source being position of our archer, given that the arrow speed is sourceSpeed, where should the archer aim at in order to hit the moving target?
q_roots : Array.<number>
Kind: global constant
computeInterceptPoint(result, source, target, targetVelocity, sourceSpeed) ⇒ boolean
Given position of the source point, and target moving at a constant velocity, compute intercept. Simple example would be target being enemy running, and source being position of our archer, given that the arrow speed is sourceSpeed, where should the archer aim at in order to hit the moving target?
Kind: global function
Returns: boolean - true iff there is at least one real solution
| Param | Type | Description |
|---|---|---|
| result | Vector3 | This is where the intercept point will be written if solution is found |
| source | Vector3 | Where to launch a projectile from |
| target | Vector3 | Where the target currently is |
| targetVelocity | Vector3 | Target's current velocity vector |
| sourceSpeed | number | Speed of the projectile in question |