RigidBody2D can report collisions (contact monitor need to be enabled and set to more than zero) and you can get them via signal (body_enter
) or checking on fixed process/custom integrator (get_colliding_bodies
).
Then just just do something like getting the group of the object is touching (you can check the angle and other things to detect a correct trigger collision), if you identify it as a "button", tell that button to do something.