I need to check the Physics Handle component of my player character blueprint to see if it is currently holding something in it’s hand. I pass the physics handle through an BPI_Interact Interface to a different blueprint and then call Get Grabbed Component to see what is being grabbed. The problem is that if the character isn’t holding anything and I try to figure out if there is any held object at all, I get a null error.
I would like to make an IsValid check on the Physics Handle to see if there is a grabbed element before I run the rest of my logic so that this error doesn’t occur but the problem is that the only way to make that check, as far as I can tell, is to call “Get Grabbed Component” on the Physics Handle. But calling Get Grabbed Component while the character isn’t holding anything is already causing the null error.
So my question is: How can I check if the Physics Handle has a grabbed object without having to call “Get Grabbed Component”?