DCS func getIP
From DCS World Wiki - Hoggitworld.com
Envrioment: | Mission Scripting | ||
Function: | getIP | Added with: 1.2.0 | |
Member Of: | land | ||
Syntax: | vec3 land.getIP(table origin , table direction , number distance ) | ||
Description: | Returns an intercept point at which a ray drawn from the origin in the passed normalized direction for a specified distance. If no intersection found the function will return nil.
| ||
Return Value: | vec3 | ||
Return Example: | vec3 | ||
Examples: | The following is a sample of a tracked weapon object that is checked periodically and updates the estimated impact point of the weapon.
for id, wpn in pairs(trackedWeapons) do local wpnData = {} wpnData.pos = wpn:getPosition().p wpnData.dir = wpn:getPosition().x wpn.ip = land.getIP(wpnData.pos, wpnData.dir, 20) end | ||
Related Functions: | land functions: getHeight, getSurfaceHeightWithSeabed, getSurfaceType, isVisible, getIP, profile, getClosestPointOnRoads, findPathOnRoads | ||
Notes: |