How would I make the camera collide with the world with this third person code.

[lua]

function MyCalcView(ply, pos, angles, fov)

local view = {}

view.origin = pos + angles:Forward()*-115 + angles:Up()*2 + angles:Right()*23

view.angles = angles

view.fov = fov

```
return view
```

end

hook.Add(“CalcView”, “MyCalcView”, MyCalcView)

hook.Add(“ShouldDrawLocalPlayer”, “MyHax ShouldDrawLocalPlayer”, function(ply)

return true

end)

hook.Add(“HUDShouldDraw”, “hidehud”, hidehud)

function render_square()

local ply = LocalPlayer()

local trace = ply:GetEyeTrace()

local pos = trace.HitPos:ToScreen()

local gap = 5

local length = gap + 5

if ply:Alive() then

```
surface.SetDrawColor( 255, 0, 0, 255) --Red
--draw the crosshair
surface.DrawLine( pos.x - length, pos.y, pos.x - gap, pos.y )
surface.DrawLine( pos.x + length, pos.y, pos.x + gap, pos.y )
surface.DrawLine( pos.x, pos.y - length, pos.x, pos.y - gap )
surface.DrawLine( pos.x, pos.y + length, pos.x, pos.y + gap )
end
```

end

hook.Add(“HUDPaint”, “square”, render_square)

hook.Add(“HUDShouldDraw”, “hidehud”, hidehud)[/lua]