Jump to content

DrawText() numbers drawing strange


Rick
 Share

Recommended Posts

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

 

image.png.e4ff5a8f9f971eddd309e21aba1421c4.png

  • Confused 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...