I am trying to see if an actor is of a specific class. In this case BP_Weapon. When i hit the object with a line trace i dont get the class. According to the image i do get all the way to my own interact function, however i cant seem to get any further. Any help would be appreciated.
GetClass should work there. But is it definitely a child of?
Ah no, because you’re calling it afterwards…
Im pretty sure, I have a BP_Item Class which BP_Weapon is a child of and in the end there is the Child to that called BP_Rifle.
So the parent child dynamic goes like Item → Weapon → Rifle.
Did you try to print HitActor to see what it is the linetrace has hit?
Thanks for the help guys. My interact deletes the item in question, i thought it would “save” the information about the class but ofcourse it doesnt. Thanks again!