So, you know now i'm making a Roleplay Gamemode. Actualy i try to render string in front of each doors of the rp_evocity_v33x map.
However, when i check the wiki about cam.Start3D2D, it says that i need to call cam.Start3D or cam.Start2D. Witch one do i need to take ?
If it's the cam.Start3D then help me finiding args to this method because i never seen a method that was taking as complicated parameters as that...
I already have a table stocking every door entity ID and associate them to a name. If you want the little part of code i've done then here :
[code]
surface.CreateFont( "DoorInfo", {
font = "Arial",
size = 18,
weight = 400,
blursize = 0,
scanlines = 0,
antialias = true,
underline = false,
italic = true,
strikeout = false,
symbol = false,
rotary = false,
shadow = false,
additive = false,
outline = false,
} )
hook.Add("HUDPaint", "Realistic_Roleplay_Door_Renderer", function()
local entity = LocalPlayer():GetEyeTrace().Entity
if (IsValid(entity) and (entity:GetClass() == "prop_door_rotating")) then
local entID = entity:MapCreationID
for k, v in pairs(mapDoors) do
local id = v[0]
local name = v[1]
if (id == entID) then
local pos = entity:GetPos()
--cam.Start3D2D stuff goes here
end
end
end
end)
[/code]
If you are going to use HUDPaint, which will also make the text draw on top of everything, you need cam.Start3D and cam.Start3D2D. If you are going to use a 3D rendering hook, such as PostDrawTranslucentRenderables, you only need cam.Start3D2D.
Sorry, you need to Log In to post a reply to this thread.