Hello, a while ago (1 hour lol) I had made a code which calculated the midpoint of a point A and a point B
here is the code I have made:
function getMidlePoint(pA,pB)
local calc = pA.Position - pB.Position
local midle = pA.Position + (calc * -0.5)
local vectorized = Vector3.new(midle.X,midle.Y,midle.Z)
return vectorized
end
the problem is that I think there is a more efficient way to achieve that without creating a function from 0 but I have not managed to find anything that can do that (referring to doing something like Vector3.midpoint(pos1, pos2)
)
anyone know a better way to do this?