As an enthusiast unreal engine 4 user I’ve launched a website for helpful resources and snippets.
Although the site is still under construction, I would like to share the first product without any delays.
For any other versions:
create a new c++ blueprintLibrary class and use the code from Plugins\CustomNodes\Source\CustomNodes –> Public and Private .h and .cpp
Description:
Get the closest overlapping actor to player based on the class filter.
It is really a simplified version of a larger set of nodes required for the same action.
Main usage:
Upon receiving the closest actor you can call an event in the newly received reference.
Input –> Get player controller-CustomNode-CastTo[Filtered class]->Call event.
I know it is not a huge boost to visual scripting, but it does have a price of 1€ at the moment which you can consider as more of a donation for me to provide more content and nodes.
For any issues that might arise I will try to solve here in the forums or via info@frostfire.ee
I guess you can handle 1000+ npcs without any noticeable change with event tick even! Conclusion: No negative impact from the plugin.
Tested it with even 5k actor, but it’s the number of actors that will eat your performance first.
The AllActorsOfClass utility is not used and would not fit the scope. The array from player character that has the list of overlapping actors is the one that is used for filtering. I am not aware of anything more efficient.
For that type of interaction using tracing would make more sense and getting the right reference is not an issue. However using only collision does not return the desired result when there are multiple actors overlapping. Here is where this node becomes useful. I am always open to any additional thoughts on the subject of improving and adding other types of nodes for a workaround.
I’ve made such a thing quite a while ago, which is much much more flexible, available for free on github. Sorry if it feels like I am invading your thread but it caught my attention. My nodes are basically a collection of some helper array functions including a QuickSort sort based on a specific property’s name.
I’m glad there is free stuff as it is also the reason to use unreal engine. This node is not something you can’t achieve with blueprints, but having it is rather a convenience. Your functions can indeed achieve the same effect, but for me it was like this exact node was missing and setting up collision based interaction takes too much valuable space in blueprints. My main goal is to contribute to the community. As this undertaking of mine is still freshly launched I have many things on my plate at the moment, but every contribution will help me produce free stuff and add more content.