I'm making a 2.5-D game and added a way to let the player move on the Z-axis but whenever I try to add a feature such as solid objects on a different axis instead of the player only not being able to pass the object on the Z-axis the object is on the collision is on every Z-axis and is getting annoying since the player will just be able to go through any object.