computeInterceptPoint
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 oen real solution
Param | Type |
---|---|
result | Vector3 |
source | Vector3 |
target | Vector3 |
targetVelocity | Vector3 |
sourceSpeed | number |