3D2D Hollow Circles

How can you make 3D2D hollow circles that have a wider edge? Also how can you make the edges smoother?

I’d like to draw one like below:

What function are you currently using to draw the hollow circle?

At the moment I’ve just tried surface.DrawCircle.

http://forum.facepunch.com/showthread.php?t=1438016&p=46533574&viewfull=1#post46533574

This script produces some good results.

Thanks, one more question - the below seems to be causing some lower frame-rate, am I doing this wrong? As I’m sure it shouldn’t be. Is there a better way to optimise it (I’ve never really done much with client-side stuff before :slight_smile: )



-- GAME.Config.Shop.Queue is a table of 4 values
hook.Add( "PostDrawOpaqueRenderables", "DrawShopCircles", function() 
	for _, queue_data in pairs( GAME.Config.Shop.Queue ) do 
		cam.Start3D2D( queue_data.Player_Position, Angle( 0, 0, 0 ), 0.5 ) 
			local x, y = 0, 0
			local radius = 40
			local thickness = 5
			local startang,endang = 0,360
			local roughness = 1
			local color = Color(0, 255, 0)

			draw.Arc( x, y, radius, thickness, startang, endang, roughness, color)
		cam.End3D2D()
	end 
end ) 


That script has to generate the polys that are to be used, this takes up quite a lot depending on the parameters you give.

The script includes a surface.PrecacheArc function which takes all the same arguments as draw.Arc except color, and it returns a table of all the polys. You can then use

surface.SetDrawColor alongside surface.DrawArc to then draw the table of polys with said color.

Of course if the structure of what you’re drawing is going to be constantly changing, this may not be an option.

Basically I need a circle on the floor to show the player where to stand, when a player stands there, it moves back a bit to form a queue.

Will test this out and see what happens :slight_smile: thanks.