Calc over shoulder view problem

Im trying to make a Over the Shoulder view for a gamemode but it seems that it only goes forward and back instead to the right, heres the code

function MyCalcView(ply, pos, angles, fov)
local view = {}
view.origin = pos-(angles:Forward()*100),(angles:Right()*100)
view.angles = angles
view.fov = fov

return view


hook.Add(“CalcView”, “MyCalcView”, MyCalcView)

hook.Add(“ShouldDrawLocalPlayer”, “MyHax ShouldDrawLocalPlayer”, function(ply)
return true

Any help would be nice

view.origin = pos - angles:Forward( ) * 100 - angles:Right( ) * 100

The comma shouldn’t be there - I think you meant to have a minus.

Another tidbit of information for you. Because you have offset the camera, if you need to render a cross-hair you’ll have to generate a 3D cross-hair.

For example: In HUDPaint, if you’re in 3rdperson then you’ll grab a trace from the LocalPlayer( ). Where that trace.HitPos is, you’ll :ToScreen( ) that HitPos.

Then, you’ll just use the .x and the .y from that vector ( Z is disregarded now ), and render a new cross-hair with that information. IF you need more help, feel free to ask.

If you don’t do this, the cross-hair will be too far to the left/right and no one will be able to aim properly.