In LE4 I'm doing the below code but it's drawing the numbers all strange. I remember this being a common thing back in the day but can't recall the solution. It's like the screen isn't getting cleared or something. I'm using the FPS template and have this in the FPSGun.lua script.
function Script:PostRender(context)
context:SetBlendMode(Blend.Alpha)
context:DrawText(tonumber(string.format("%.3f", self.offset.x)), 10, 100)
context:DrawText(tonumber(string.format("%.3f", self.offset.y)), 10, 120)
context:DrawText(tonumber(string.format("%.3f", self.offset.z)), 10, 140)
context:SetBlendMode(Blend.Solid)
end