-- Define the line segment with start and end points
local startX, startY, startZ = 100.0, -200.0, 50.0
local endX, endY, endZ = 200.0, -100.0, 50.0
-- Define the plane with a point on the plane and the normal vector
local planeX, planeY, planeZ = 150.0, -150.0, 50.0
local normalX, normalY, normalZ = 0.0, 0.0, 1.0
-- Call the native
local success, intersectionParameter = GetLinePlaneIntersection(startX, startY, startZ, endX, endY, endZ, planeX, planeY, planeZ, normalX, normalY, normalZ, intersectionParameter)
if success then
-- Calculate the intersection point using intersectionParameter
local intersectX = startX + (endX - startX) * intersectionParameter
local intersectY = startY + (endY - startY) * intersectionParameter
local intersectZ = startZ + (endZ - startZ) * intersectionParameter
print("Intersection point at: (" .. intersectX .. ", " .. intersectY .. ", " .. intersectZ .. ")")
else
print("No intersection found.")
end