[2D Platformer] How Do Make My Character Walk Through A Platform

I Have added a platform effector to a platoform and it works all fine but how do i make my character not interact with the sides of the box collider basically how do i make my character through the platform

You have 3 ways for this task:

  1. As Cherno said: With ray casts.

  2. You can use 2 colliders: 1 for platform and second for activator for the paltform collider. Place the activator under the platform, if character touch it with his head then activate platform collider.

  3. Platform script: you can write a script for activating a platform collider if player position is above the platform, of course you must add some position offset.