Sunday 21st January 2024
Blog Entry 5
I have finally completed the interaction components. Yay.
After the Christmas break, I was able to ask my lecturers for help with the interaction components. They had no idea how to solve it and said that they had never tried to do something like what I was trying to do in Unreal let alone Unreal C++. As such I decided to take a new approach to the issue. Why not make an interactable actor? True it is less versatile that the interaction component I had intended but having interaction is better than not and I can change how the interactable actor works later on to add any functionality I may need.
After changing my approach the work went very smoothly, I was even able to add a way to easily change what “interaction” happens when the interactable actor is interacted with. And this approach is compatible with the Unreal details window so it can be changed easily by anyone using the interactable actors.
The final result has two main classes, the interactable actor that handles the actual interaction and triggering the action and the interaction action which handles what the interaction should do. The interaction action is actually an abstract class providing developers (me) the ability to extend it with exactly what they want to happen when the action is triggered. This action is then visible in the details window of the interactable actor allowing for it to be easily selected.
I plan to work on implementing the date management system next. Hopefully this will be a nice change from the issues I had with the interaction component.