Cam3D2D 90 degrees up.

I just want the rectangle to be 90 degrees even though I turn it.

like I can’t do Ang + Angle(90,0,0) cause when I start turning it f*cks up.

[LUA]
function ENT:Draw()
self:DrawModel() – Draw the model.

local Pos = self:GetPos()
local Ang = self:GetAngles()

cam.Start3D2D(Pos, Ang, 1)
	surface.SetDrawColor(0,255,0,255)
	surface.DrawRect(0,0,10,10)
cam.End3D2D()

end
[/LUA]

Please help.

Ang.p = Ang.p + 90

90 degrees in relation to what? If you want the angle to be static don’t use the entity’s angles at all, i.e.



cam.Start3D2D(Pos, Angle(90, 0, 0), ...



function ENT:Draw()
    self:DrawModel()       -- Draw the model.

	local Pos = self:GetPos()
	local Ang = self:GetAngles()

       Ang:RotateAroundAxis(ang:Right(), 90) --Provide the axis and the rotation amount, ang:right() returns the direction vector for the X axis of the angle so its always relative to the entity instead of the world

	cam.Start3D2D(Pos, Ang, 1)
   		surface.SetDrawColor(0,255,0,255)
   		surface.DrawRect(0,0,10,10)
   	cam.End3D2D()
end

HUGE FAN! :pudge:

And thanks it worked.