Creating a hittest

Whats the simpliest way, if you have an objet lets say a tree, how would you make it so you cant walk into it? I’m not using tile based.