I created an interaction interface which passes both a component that the player is looking at when clicking Mouse1 and a PhysicsHandle Component of the player character to another blueprint. So when you hold one actor in your hand, look at another actor and press Mouse 1, the BPI_Interact interface will pass the looked at object reference and the Physicshandle to the blueprint you clicked on.
I want to check if the player is holding an actor and if that actor is of a certain type so that I can decide if, for example, I can fill a cup with water, if the player clicks on it while holding a water bottle. I already made a different post that goes into what Iāve already done:
The problem is the Equal check that I do to find out if the object Iām holding is equal to the āwater bottleā.
this is how the physics handle and the looked at component are being passed to the blueprint.
But when I click the object I get the following name printed out from Get Display Name:
So the thing Iām checking for is āBP_DC_Pappeā, but the display name comes from the static mesh component of the blueprint: āBP_DC_Pappe.DC Pappe SM_DC_Paperā
So it gets the child component of the root component that Iām actually checking for, I guess. So how can I get the āBP_DC_Pappeā from my physics handle so my equal check actually works?
EDIT: I have tried to use Get Owner on the grabbed component. It has the same display name as what i want, which is āBP_DC_Pappeā, but it still doesnāt register in the Equal check. So my guess is that the AActor reference for āBP_DC_Pappeā is not equal to the āBP_DC_Pappeā Blueprint?