Is there a way to filter a hit result for worldstatic/world dynamic?

I want certain events to happen but only when it hits worldstatic objects.

Yes, with comparing component’s collision