Creates a model panel with Eli rotating normally and the camera angles rotating sideways.
BGPanel =vgui.Create("DPanel")
BGPanel:SetPos(20, 20)
BGPanel:SetSize(400, 400)
BGPanel:SetBackgroundColor(Color(0, 0, 0, 255))
local mdl =vgui.Create("DModelPanel", BGPanel)
mdl:SetSize(BGPanel:GetSize())
mdl:SetModel("models/eli.mdl")
-- Position cameramdl:SetCamPos(Vector(0, 60, 36))
local yaw =0functionmdl:LayoutEntity(ent)
-- Point camera toward the look poslocal lookAng = (self.vLookatPos-self.vCamPos):Angle()
-- Rotate the look angles based on incrementing yaw valuelookAng:RotateAroundAxis(Vector(0, 1, 0), yaw)
-- Set camera look anglesself:SetLookAng(lookAng)
-- Make entity rotate like normalent:SetAngles(Angle(0, RealTime()*30, 0))
yaw = yaw +1end