• 3D2D Text is Weird
    10 replies, posted
I'm drawing some text in 3D2D. This is what it looks like. [IMG]http://i182.photobucket.com/albums/x305/Entoros/gm_construct0021.jpg[/IMG] Here is the code. [lua]surface.CreateFont("Army",60,600,true,false,"TestFont2") local ang = Angle(0,0,90) function ENT:Draw() self.Entity:DrawModel() 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.End3D2D() 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)) cam.End3D2D() end[/lua] 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?
[QUOTE=blackops7799;20223077]Try putting this in shared.lua [lua]ENT.RenderGroup = RENDERGROUP_BOTH[/lua][/QUOTE] I tried that with my 3D2D just and it doesn't work with props, not sure about trees though. [editline]10:56[/editline] 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 :(
[QUOTE=Ningaglio;20247294]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 :([/QUOTE] 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 :P
I remember setting it to RENDERGROUP_TRANSLUCENT for my 3D2D text. Try that?
[QUOTE=Clavus;20247366]I remember setting it to RENDERGROUP_TRANSLUCENT for my 3D2D text. Try that?[/QUOTE] That's what I have mine on, yeah, I presumed he would of already been using that though.
[QUOTE='[ApS] Elf;20247190']I tried that with my 3D2D just and it doesn't work with props, not sure about trees though. [editline]10:56[/editline] 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?[/QUOTE] 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.
[QUOTE=Entoros;20248634]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.[/QUOTE] Strange. Have you experimented with both: [lua]ENT.RenderGroup = RENDERGROUP_TRANSLUCENT; ENT.RenderGroup = RENDERGROUP_BOTH;[/lua] [editline]13:47[/editline] I mean separately*.
Sorry, you need to Log In to post a reply to this thread.