Hi,
I want to create a safe zone at spawn, but i want my player to be able to actually see it, it will most likely be a 3d rectangle.
Should I use cam 3d2d or it isn't the best way to do it ?
You could use either render.DrawBox or render.DrawWireframeBox.
Thanks a lot Badger, i will test it out and accept answer if it works !
I wanted to ask before diving in code
Have a nice day
Ok so i use DrawWireFramBox and it worked just fine, i then tried to use drawBow but it seems that the Color is fcked up, i see a big red cross on each face :/ What is the problem ?
render.DrawBox( Vector(0,0,0), Angle(0,0,0), Vector(640.018677, 799.989685, -143.968750), Vector(1023.974792, -896.031250, 64.006676), Color(255,0,0,255), true )
The problem is that you need to set the material before calling DrawBox, otherwise it draws it with whatever material was last used.
local mymat = Material("models/debug/debugwhite") -- Put this outside (before) the hook
------
render.SetMaterial(mymat) -- Put this just before render.DrawBox()
I can't figure out to color the material tho
Try render.SetColorMaterial instead
Sorry, you need to Log In to post a reply to this thread.