How to give gravity to a localized object?

I have a game in space and I want the player to be able to jump from asteroid to asteroid. Catch is that because it’s in space I want the player to be able to walk along every side of the asteroids and when you jump, get attracted and fall towards another one provided it’s close by. So basically make every object a mini planet that can be jumped to. Unlike most questions I tend to ask here, for this I have no idea how I’m meant to do this or where even to start. I have this question in Blueprint Scripting but I’m not even sure if this is the right place to put it. Does anyone have any ideas how I should be doing this?