Using 3D2D cam for nametags?

Hey everyone!

I remember doing a project once, where I used a piece of code a friend made for me. It displayed player names over their heads. It used 3D2D cam for this, and stood out from other overhead hud elements.
Does anyone know how to do this? I tried looking at the 3D2D cam library, but it was too confusing for me :confused:

Any help is appreciated :smiley:

  • Fillipuster

    local offset = Vector(0, 0, 79)
    local ang = LocalPlayer():EyeAngles()
    local pos = ply:GetPos() + offset + ang:Up()
    ang:RotateAroundAxis(ang:Forward(), 90)
    ang:RotateAroundAxis(ang:Right(), 90)
    cam.Start3D2D(pos, Angle(0, ang.y, 90), 0.1)
        draw.DrawText(ply:GetName() , TEXT_ALIGN_CENTER)

I don’t take any credit for this code, Can’t remember what it’s from but I had used it in another addon and kinda stole it from a public addon I had on the server that used it from something else. Might of been text hat…