Some trouble with setting eye angles

I’m developing an isometric camera and want the player to aim where I point but the resulting vector using my code is just somewhat off. I’ve verified that the trace from gui.screentovector is giving me the right world coordinates so I must be doing something wrong in the way I calculate the angle between that and the original eye trace. The read beam is the trace from the player to the point in the world where my cursor is aiming and the physbeam shows where the player is aiming as a result of my code. They should be hitting at the same point on the terrain. (The read beam is the correct one)

[lua]local vector1 = gui.ScreenToVector( gui.MouseX( ), gui.MouseY( ) ) local traceRes1 = util.QuickTrace( view.origin, vector1 * 10000, ply )
beamendy = traceRes1.HitPos

local vec1 = traceRes1.HitPos -- This is where we are going to look at
local vec2 = ply:GetShootPos() -- The player's eye pos
ply:SetEyeAngles( ( vec1 - vec2 ):Angle() ) -- Sets to the angle between the two vectors[/lua]

EDIT: solved with GM:OnContextMenuOpen( )end