I am building a system for FiveM, by using LUA. For that system I need a specific coordinate.
I know coordinates A, B, C, D, E, P. But now I want to know point G.
How would I do that with math, and how would I do that in LUA ?
-- P, E, D - vectors
local EP = P - E
local nED = norm(D - E)
local G = P - (EP.x*nED.x+EP.y*nED.y+EP.z*nED.z)*nED