BoxCollider2d not working

Hello so my boxcoolider 2d is not working I have a composite collider on the grid and a box collider on the player but the player walks below or above it tgis is not a sorting layer issue and the boxollider is not set to is ytrigger pls help

To be honest, I would ask that you put a little more effort into asking questions. You’ve typed BoxCollider several different ways and there’s lots of typos and have not even edited your post for clarity. What you’re asking needs to be clear for others to read. Please spend more time detailing your set-up, what you’re doing and what you’ve tried (debugging). Thanks!

So the BoxCollider2D is working fine, your set-up or what you’re doing obviously isn’t. The fact that you’re suggesting that a sorting layer which has nothing to do with physics but rendering only “isn’t an issue”, suggests that you need to follow a 2D physics tutorial on how to configure 2D physics correctly.

You use the Layer Collision Matrix in the 2D Physics Project Settings to configure what can contact what. You also didn’t mention a Rigidbody2D so it sounds like you’re using the Transform to change the position of a Static (non-moving) collider. It sounds like you’re trying to get two Static colliders to somehow dynamically contact which is completely incorrect.

But it’s impossible to help with the rough description above. Forget composites and all the other irrelevant things. I would suggest you understand the basics first and maybe just get an empty scene and see if you can get two things contacting as you expect away from your other project.

It was working fine earlier then I dont know what happened

This is why you should use source control. It’s easy to rollback to understand what you broke.

Also, you didn’t put any more effort into explaining what was wrong, just mentioned that it stopped working so impossible to help. Obviously, nobody can know what you broke and how you broke it.

If you want help in the future, please provide something that someone could use to help you.

Thanks.