FOV setting for CalcView?

Hey, I’ve been trying to get taunts to work on a base gamemode and tried using this (which I found on some TTT forum.)



if SERVER then
	AddCSLuaFile()
else
	temp = {}
	hook.Add("CalcView", "CalcViewTaunt", function(ply, view, angle, fov)
		if not LocalPlayer().TauntCam then
			LocalPlayer().TauntCam = TauntCamera() 
		end
		temp = {
			angles = angle,
			origin = view,
			fov = 100
		}
		if LocalPlayer().TauntCam:CalcView(temp, LocalPlayer(), LocalPlayer():IsPlayingTaunt()) then 
			view = temp.origin
			angle = view.angles
			fov = 100
			return GAMEMODE:CalcView( ply, temp.origin, temp.angles, fov ) 
		end
	end)
	hook.Add("ShouldDrawLocalPlayer", "ShouldDrawLocalPlayerTaunt", function()
		if not LocalPlayer().TauntCam then
			LocalPlayer().TauntCam = TauntCamera() 
		end
		if LocalPlayer().TauntCam:ShouldDrawLocalPlayer(LocalPlayer(), LocalPlayer():IsPlayingTaunt()) then 
			return true 
		end
	end)
	hook.Add("CreateMove", "CreateMoveTaunt", function(command)
		if not LocalPlayer().TauntCam then
			LocalPlayer().TauntCam = TauntCamera() 
		end
		if LocalPlayer().TauntCam:CreateMove(command, LocalPlayer(), LocalPlayer():IsPlayingTaunt()) then 
			return GAMEMODE:CreateMove(command)
		end
	end)
end


For some odd reason I can’t get the FOV to work correctly. The cam is directly in the head of the player.
Any ideas?

Thanks.

Define “can’t get the FOV to work correctly”.

Sorry should have stated that I couldn’t get my edits to the FOV to actually apply once Taunting.

Can you verify that modifications to the angle and origin are working? I hate the hook library for being useless for this sort of situation.

For some reason I can’t get that to work either, possibly I’m doing this wrong but I’ve tried doing something like this:



origin = view - Vector( 248, -7, 76 ),


also editing it after the if statement



view = temp.origin - Vector( 248, -7, 76 )


It’s not the hook library’s fault.
It’s how CalcView is implemented.