3D2D that always faces you?

Very simple request, and I know you are probably asking, “what the fuck, why not just use DrawText?”

But this is what I want: a DOOM sprite-style 3D2D effect wherein the displayed text always faces you no matter what YAW or PITCH angle you are looking at it… NOT ROLL… so left-right and up-down only!

I’m sure the algorithm to achieve this is pretty simple, I just have no idea how to do it.

Thanks guys. :slight_smile:

cam.Start3D2D( Vector(0, 0, 0), (LocalPlayer():GetAngles()*-1), 1 )
draw.DrawText(“Your Mother”, “ScoreboardText”, 0, 0, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER )


I think that may work. I have no idea it’s complety untested.

[lua]local pos = Vector(0, 0, 0) – Position of the text
local ang = pos - EyePos()
cam.Start3D2D(pos, Angle(ang.p, ang.y, 0), 1)
draw.DrawText(“Text Here”, “ScoreboardText”, 0, 0, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER)

Ah! EyePos() Forgot about that function!

D’oh! No worky. Any way to make it parented to an entity but still always face you? :smiley: