Reseting CalcView?



function ResetCam()

hook.Add( "CalcView", "CCTVReset", function( ply, pos, angles, fov )
	local view = {}

	view.origin = firstpos
	view.angles = firstangles
	view.fov = fov
	view.drawviewer = true

	return view

end)

end


Hi, I was wondering how to reset CalcView, I had attempted to store values from the first time I call calcview and reset them here but that did not work, any help is appricated thanks.

What do you mean “reset CalcView”?
If you have a CalcView hook running that you don’t want, you can just remove it

Is firstpos actually defined? If its a local variable, make sure its inside the same file, and outside of any function, else the ‘ResetCam’ function cannot access firstpos, firstangles etc.

Thanks.