So I actually have two fairly similar problems.
Problem one: I want to randomly spawn enemies in an x axis but the enemy can spawn inside a wall, is there anyway I could check if there is a wall don't spawn there?
Problem two: The player can carry a gem but you can drop the gem into a wall, is there anyway to avoid that?