I found a couple of typos in my code and corrected the version above. It now almost works but does not work after changing the size of my cubes or "tools". Before changing the length of the cubes, the collision checking seems to work.
Any ideas?
Any ideas?