how to check if a player is next to a wall

I am using the CalcView hook and I wanted to know if someone can show me how to check if a player is by a wall regardless where they look at.

Maybe with [lua]ents.FindInSphere(ply:GetPos(),60)[/lua] if its possible. I tried using it but no luck ,most likely I am doing something wrong.

One way I can think of is using util.TraceLine to check in different directions if there’s a hit, there may be a better solution though I’m not sure.

that is what I did but I was only able to check from a couple of directions I want it check around the whole player

Use a hull trace and set it to a slightly large BB than the player.

I don’t understand how [lua] util.TraceHull()[/lua] works, can you enplane please.

This page may help you out a bit…

Is there a way to trace behind the player with this ??

[editline]5th February 2014[/editline]

its ok I figured it out . thank you guys for showing me tracehull