include("shared.lua")
function ENT:Draw()
self:DrawModel()
local Pos = self:GetPos()
local Ang1 = Angle( 0, 0, 90 )
cam.Start3D2D( Pos, Ang1, 0.2 )
draw.DrawText( "????", "TargetID", 0, -50, Color(0,0,0), TEXT_ALIGN_CENTER )
cam.End3D2D()
end
I've been searching on the internet but i have a problem with this, I want to put a text above an entity but the text needs to be higher and for some reason it can only be seen for one perspective
I'm confused with what you're trying to do here, do you want it when you hover over something then it shows it?
No, just a text hovering the entity
https://files.facepunch.com/forum/upload/106967/02b39470-2545-48dd-992a-6443740505fb/chrome_2018-01-27_19-42-31.png
local Pos = self:GetPos() + Vector(X, Y, Z)
If you want it to be seen from both sides - add new cam.Start3D2D with opposite angles.
could he not just do it in the same cam3d2d?
So I just need to add a Vector with(X, Y, Z) in it and its the oposite of the angle?
You can also do this:
function ENT:Draw()
self:DrawModel()
local Pos = self:GetPos()
local Ang1 = Angle( 0, 0, 90 )
cam.Start3D2D( Pos , ply:GetAngles() + Ang1, 0.3 )
draw.DrawText( "????", "TargetID", 0, -50, Color(0,0,0), TEXT_ALIGN_CENTER )
cam.End3D2D()
end
Sorry, you need to Log In to post a reply to this thread.