Hi, I have a couple of actors (item, interactable, character, navigation ground) and I want to raycast from mouse and check if I hit any of them in a particular order so I can have a mouse over effect. How do I filter the ray cast function in blueprints ? is there a layer system in unreal engine ?
I think Blueprint Interfaces might be able to help you out here. Create an interface for “BP_ITF_Interactable” that has a function called “Interact”, then on your Item, Interactable, Character etc. In the Class Settings, you can select BP_ITF_Interactable as the interface to use. Compile/Save the blueprint, then you can create Event Interact functions for each BP. Then when you do your raycast, break the Hit Result and on the Hit Actor call “Interact (Message)” function. If the blueprint utilises this interface, then it will check if the blueprint has its own implementation of the Interact function, if it does, it will call it, if not then it won’t do anything.