What is the best way to make Object sticky (adaptive gravity) ?

Hello !

I was looking for a way to make a mob sticky like on the Hollow Knight screenshot, it should just walk normally and at ledge rotate while changing his gravity to the center of the platform (I’m working on a 2D platformer).
Do you know if that’s possible ?
I could change the gravity when it falls but I doubt it would be a good idea…
I don’t know if there is another way, like setting a gravity point on the platform or something else.

Thank you in advance !
197213-sticky2.png
197214-sticky3.png

Ok !
so it worked giving 0 gravity and changing the velocity (directed to the platform) and rotating it when it’s falling with a Raycast2D (under it).