I am searching for a proper solution to this since my first day here and I realized that you have 2 proper options:
- Create a component blueprint with bob up and down behavior, so you can attach or detach it to any actor with a translation. (instead of making it a blueprint itself). So you would have your BP_Cube and your BP_Sphere, both with a component attached: Comp_Bobbing.
It is disappointing and surprising that through blueprints, you won’t be able to override Comp_Bobbing in your BP_Cube and BP_Sphere, so if you want your 2 shapes bob up and down differently you will need to use inheritance doing something like:
-
BP_Mesh implements Comp_Bobbing
-
Make BP_Cube and BP_Sphere child of BP_Mesh
Now BP_Cube and BP_Sphere will be able to override your BobUp function at Comp_Bobbing. Otherwise it is not possible. -
The second solution would be to use an interface. So you would add to BP_Cube and BP_Sphere an Interface like “IBobable” :D. And then you can just implement it as you wish, easy and fast and performance efficient!! However…
You will have to re-implement the interface functionality for each and every blueprint using that interface, because, we can’t have a default implementation for an interface in blueprints. So you will need again inheritance.
Hope this help and hopefully there is a 3rd method that I couldn’t find yet and someone bring lights about.