I want to draw 3D text on certain positions in C#
I have this code snippet for LUA:
function DrawText3D(x,y,z, text, r,g,b)
local onScreen,_x,_y=World3dToScreen2d(x,y,z)
local px,py,pz=table.unpack(GetGameplayCamCoords())
local dist = #(vector3(px,py,pz)-vector3(x,y,z))
local scale = (1/dist)*2
local fov = (1/GetGameplayCamFov())*100
local scale = scale*fov
if onScreen then
if not useCustomScale then
SetTextScale(0.0*scale, 0.55*scale)
else
SetTextScale(0.0*scale, customScale)
end
SetTextFont(4)
SetTextProportional(1)
SetTextColour(r, g, b, 255)
SetTextDropshadow(0, 0, 0, 0, 255)
SetTextEdge(2, 0, 0, 0, 150)
SetTextDropShadow()
SetTextOutline()
SetTextEntry("STRING")
SetTextCentre(1)
AddTextComponentString(text)
DrawText(_x,_y)
end
end
But I don’t know how to implenet it in C#
Any help would be appreciated!