3D2D Text is Weird

I’m drawing some text in 3D2D. This is what it looks like.

Here is the code.

local ang = Angle(0,0,90)
function ENT:Draw()

ang.yaw = ang.yaw + 1
if ang.yaw > 360 then ang.yaw = 0 end

local col,cap,str = color_white, self.Entity:GetNWInt("HasCapped"),"no team"
//if cap == 1 then col = team.GetColor(1) elseif cap == 2 then col = team.GetColor(2) end
if cap == 1 then col,str = Color(255,0,0),"Red" elseif cap == 2 then col,str = Color(0,0,255),"Blue" end

cam.Start3D2D(self.Entity:GetPos() + Vector(0,0,150),ang , 1)
	draw.SimpleTextOutlined(str, "TestFont2", 0, 0, col, 1, 1, 2, Color(0,0,0,255))

cam.Start3D2D(self.Entity:GetPos() + Vector(0,0,150),Angle(0,180 + ang.yaw,90) , 1)
	draw.SimpleTextOutlined(str, "TestFont2", 0, 0, col, 1, 1, 2, Color(0,0,0,255))


Any clue why it’s being drawn behind the stuff like the trees and the building? It’s rather annoying.
(Errors are unrelated)

Try putting this in shared.lua

[lua]ENT.RenderGroup = RENDERGROUP_BOTH[/lua]

had the very same propblem myself, but can you explain some other render groups blackop’s please?

I tried that with my 3D2D just and it doesn’t work with props, not sure about trees though.


Can you not move it forward? Because it looks like it’s in the skybox and it’d probably be best if it wasn’t?

i know what you mean when you say it looks like part of the sky box, i am making a rulesboard and people think that it sizes in function to their distance and its part of skybox :frowning:

Well, I’m not sure how correct this is, but if you put it in a 3D skybox wouldn’t it multiply the size by 16?

well it draws behind the props so it only looks like a skybox, not is one :stuck_out_tongue:

I remember setting it to RENDERGROUP_TRANSLUCENT for my 3D2D text. Try that?

That’s what I have mine on, yeah, I presumed he would of already been using that though.

It’s not in the skybox. It is positioned directly above the prop on the ground. It just looks like it’s in the skybox because the trees/buildings are rendered in front of it.

Strange. Have you experimented with both:
ENT.RenderGroup = RENDERGROUP_BOTH;[/lua]


I mean separately*.