I need some help with some angle calculations. I am making a entity which if you look at shows a text. I got some basic 3d2d from the wiki and changed it a bit. I got this :
local offset = Vector( 0, 0, 25)
local ang = LocalPlayer():EyeAngles()
local pos = self:GetPos() + offset + ang:Up()
ang:RotateAroundAxis( ang:Forward(), 90 ) ang:RotateAroundAxis( ang:Right(), 90 ) cam.Start3D2D( pos, Angle( 0, ang.y, 90 ), 0.25 ) draw.DrawText( "Test", "CV20", 2, 2, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER ) cam.End3D2D()
And that looks fine because it rotates the text above my entity too look at me but it only does that on the z axis (yaw ?). but I also want it to pitch properly so the normal of the text faces me.
How would I accomplish that ?