The problem of collision

I have read somewhere that predict a collision using hittest isn’t a good way
any other choices?

ex: I need to move a little boy, on the screen there are: 2 trees, 5 rocks and 1 river(the boy can’t walk on those things)