(Thirdperson) Checking if a player is up against a wall(anti-clipping checks)
1 replies, posted
[code] local UseTP = false
local function ToggleTP( len )
UseTP = !UseTP
end
net.Receive( "CL_EnableThirdPerson", ToggleTP )
local view = {origin=vector_origin,angles=angle_zero,fov=0}
local function MyCalcView( playr, positn, angles, fov )
view.origin = positn
view.angles = angles
view.fov = fov
if UseTP then
view.origin = positn-(angles:Forward()*85)
end
return view
end
hook.Add( "CalcView", "MyCalcing", MyCalcView )[/code]
Hey there! If you can't tell by the code, I'm making a simple thirdperson system. Does anyone know how I could check if the player is up against a wall? As this is for TTT, I want to prevent possible ghosting by people looking through walls when they get up against them in the TP mode. Thanks!
traces
Sorry, you need to Log In to post a reply to this thread.