My Box collider 2D does not follow the sprite when its jumping.

So I’m trying to make my quad jump on Y-Axis however when doing so the boxcollider2d takes time to catch up with the sprite which is causing it have inaccurate collisions with the obstacles.138637-collision.png

sorry for the inconvenience guyz @tormentoarmagedoom , @xxmariofer was in a hurry. Attaching the code and a video of the behavior.
So what i did was make all the jumping possible through raycasts and some box colliders.

Adding vertical collision code only since it’s not taking more than 1 snippet.

Video Link: Imgur: The magic of the Internet alt text

I had a similar issue a few months ago. The issue has to do with one of Unity’s settings. You need to go to Edit → Project Settings → Physics2D and check the box that says “Auto Sync Transforms.”

Edit: I see you’re a man of culture as well and are making your own raycast system; here’s my post in case you’re interested: 2D: Why aren't my raycasts conforming to their origin points? - Questions & Answers - Unity Discussions

Edit 2: This other post may also be useful for you. I discovered that adding a kinematic Rigidbody2D fixed the discrepancy between my Quad’s position and its box collider 2D. Why is my quad not moving in sync with its collider? - Questions & Answers - Unity Discussions