Two 3D2D Questions

Hey everyone, I was toying around with 3D2D and tried rendering a view on a random vector just as a test and it ended up crashing my game so I’m assuming there’s a specific way that involves RT cameras? If so does anyone know which functions it should consist of?

Also I’d like to render and parent the text to a v_model on a SWEP what function would I use for this? I tried SWEP:DrawWorldModel() but that’s for w_model’s so any ideas?

RT means render target. Rt’s go quite into depth but theres essentially 2 render targets in garrysmod: the players screen and Screen Space.

3d2d has nothing to do with render targets, instead it works like AutoDesk’s ScaleForm, allowing the drawing of user interface (ui) to the 3d world without the worry of scaling it to the angle that the player is looking at it.

to draw text to a view model, check the tool gun code which is in gamemodes/sandbox/entities/weapons (cl_init.lua, shared.lua and init.lua)

it uses a render target for the screen.

rendertargets act in the way that the players screen does. you can draw elements to it, even another hud and even the blackops camera spike type things.