Approach look angle
This commit is contained in:
parent
81ff538924
commit
9a670bb074
|
@ -5,6 +5,7 @@ local wa, wb = 0, 0
|
||||||
|
|
||||||
local blop = Angle()
|
local blop = Angle()
|
||||||
local lastmoveangle = 0
|
local lastmoveangle = 0
|
||||||
|
local lastmoveangle_lerp
|
||||||
TPSOverride = TPSOverride or Angle()
|
TPSOverride = TPSOverride or Angle()
|
||||||
hook.Add( "CreateMove", "CamFuck", function( cmd )
|
hook.Add( "CreateMove", "CamFuck", function( cmd )
|
||||||
if false and BENNY_ACTIVECAMERA and LocalPlayer():GetMoveType() != MOVETYPE_NOCLIP then
|
if false and BENNY_ACTIVECAMERA and LocalPlayer():GetMoveType() != MOVETYPE_NOCLIP then
|
||||||
|
@ -85,7 +86,8 @@ hook.Add( "CreateMove", "CamFuck", function( cmd )
|
||||||
if !moveintent:IsEqualTol( vector_origin, 1 ) then
|
if !moveintent:IsEqualTol( vector_origin, 1 ) then
|
||||||
lastmoveangle = ang.y - moveintent:Angle().y
|
lastmoveangle = ang.y - moveintent:Angle().y
|
||||||
end
|
end
|
||||||
cmd:SetViewAngles( Angle( ang.p, lastmoveangle, 0 ))
|
lastmoveangle_lerp = math.ApproachAngle( lastmoveangle_lerp or lastmoveangle, lastmoveangle, FrameTime() * 360 )
|
||||||
|
cmd:SetViewAngles( Angle( ang.p, lastmoveangle_lerp, 0 ) )
|
||||||
end
|
end
|
||||||
|
|
||||||
local fixang = Angle()
|
local fixang = Angle()
|
||||||
|
|
Loading…
Reference in New Issue