Is having any callback function or another way to make blocking dynamic?

Hi, I want to make the object ‘A’ can move out from the object ‘B’ inner, Otherwise, blocking. Is having any callback function or another way to make blocking dynamic?
Thanks.

You could have B start with Collision enabled set to “Query Only” and then OnComponentEndOverlap set it to “Collision Enabled”?

Thinks.
I found this make it worked.

If You want blueprint solution why You asking in C++ subforum?

Because have no answer for C++ in this post