when determining whether a position is valid also take existing objects and walls into consideration
So far the only consideration was if the object is outside of the world boundaries. Now we also check for objects (and their dimensions) as well walls to determine an object can or cannot be placed.