Rotating player angles in CalcView

So, I’ve been messing around with angles in calcview for a few hours now:



function SpectateEntity(ply, pos, angles, fov)
	for k, v in pairs(ents.FindByClass("prop_physics") ) do
			if tostring( v:GetNWInt(0) ) == tostring( LocalPlayer():UniqueID() )  then
				if v:GetNWInt("gravright") == 1 then					
					local view = {}				
					view.angles = angles
					view.angles = Angle( angles.y, angles.p, 0 )
					view.origin = v:GetPos() + view.angles:Forward()*-100
					return view	
				else
				local view = {}	
					view.angles = angles
					view.origin = v:GetPos() + view.angles:Forward()*-100
				return view	
				end	
			end
	end
end
hook.Add("CalcView", "asdf", SpectateEntity)	


Essentially, it’s designed to spectate an entity, when the networked integer “gravright” is active, it shifts the camera 90 degrees to the right, while maintaining the player’s ability to look around while not messing with the way looking around works (moving the mouse left moves the camera left, etc.)
I’ve tried a few things such as switching the pitch and yaw of the angles, subtracting them from 90, adding 90, all of these give me pretty weird results. I can’t quite figure out the math on this one, if somebody could help me out, that’d be great.
Thanks in advance