• Render help
    1 replies, posted
So I want to render a sphere. I tried just doing render.DrawSphere, but I realized I needed a texture too. I would preferably like a semi-opaque solid red sphere. Anyone know how I can go about this? Here's my code: [code] debugmat = Material("models/debug/debugwhite", "") function GM:PostDrawOpaqueRenderables() if selectStart then center = (LocalPlayer():GetEyeTrace().HitPos+selectStart)/2 render.SetMaterial(debugmat) render.DrawSphere(center,(LocalPlayer():GetEyeTrace().HitPos-selectStart):Length()/2,20,20,Color(255,0,0,100)) end end [/code] This just draws a solid, opaque black sphere. Even though the color is red...
[lua]render.SetBlend( .1 ) and render.SetColorModulation( 1, 0, 0)[/lua] May or may not help.
Sorry, you need to Log In to post a reply to this thread.