Call Blueprint interface implementation for base class from child class
Sorry for my english, but i'll try to explain what i want to do. So, i have inteface in C++:
C++ class, which inherits from interface:
And i have child class of game item, for example:
Then i'am creating a Blueprint from my AItemBase (ItemBase_BP) class and another one - from AStaticItemBase (StaticItemBase_BP). Some instances of StaticItemBase_BP are placed to game map to interract with. What was my idea: in ItemBase_BP i make implementation of interface methods PickupItem() and DropItem(), that will be called from MotionController BP (standart from VR-sample) using interface call when i'am trying to pick up an object StaticItemBase_BP with motion controller.
All checks like "is overlapping objects implements my interface" are correct and works fine.
Problem is, that execution never comes to ItemBase_BP event PickupItem()/DropItem() for StaticItemBase_BP objects. I think that's because they (objects) are not directly inherited from ItemBase_BP.
ItemBase_BP is inherited from AItemBase C++ class (and C++ interface), StaticItemBase_BP is inherited from AStaticItemBase C++ class (which is inherited from AItemBase C++ class =)).
Please, can someone explain me, how this can be solved? I mean, is there any way to call Blueprint implementation of base class interface function for ALL child objects, which are inherited from that base class?
Thank you! Alex
Follow this question
Once you sign in you will be able to subscribe for any updates here