You can refer to BP_Cube_Way1 and BP_Cube_Way2 in the plugin directory. It is mainly based on monitoring (the monitoring tag is built into the interactive system, and it is defined in C++, so you can't change several monitoring events in the system)
Interaction Implementation Method 1
Interaction Implementation Method 2