Drawing a sprite which is unaffected by distance?

How would I go about creating a sprite, that doesn’t change size on distance? (So you can be at the other side of the map and it will still be 16pixels big on screen etc)

[lua] cam.Start3D(EyePos(),EyeAngles())
render.SetMaterial( material )
render.DrawSprite( pos, 16, 16, white)

Like the above code, but doesn’t change size with difference from it?

Draw it on the screen and not in 3d space.

You can use **[Vector.ToScreen

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Vector.ToScreen)** to get the position on screen from the world coordinates.

Ah perfect! Thanks

I completely forgot about that function.


Hmm, I’ve run into another problem. Is there something similar to SWEP:DrawHud() but for ENT?

I’m really late, but whatever. I’m sure you don’t need help with this now.

This is from an old flare ent i made

local FlareEffect = Material("sprites/dot")
local BallEffect = Material("effects/yellowflare")

function ENT:Draw()
	if CLIENT then
		local Distance = LocalPlayer():GetPos():Distance(self:GetPos())/60 + 0.1
		local Distance2 = LocalPlayer():GetPos():Distance(self:GetPos())/200 + 0.1

Only 6 years