Goal: Set visibility of anything between the camera and the player to false and back to true later
I have a multi line trace by channel starting at the camera and going to the player. I then run a for each loop on the array of objects the line passes through. I break it and grab the hit actor that I pass through a BP interface to the BP. When at the BP I set the visibility to false. This works great and only changes whatever items I hit but the problem is there is no Even finished function or any way to tell when this process is over so that I can set the visibility back to true.
I plan on allowing the player to move the camera away from the character and snap it back. I would only set the visibility to false if the start, end distance is <= a number.
I am curious if there is some way to use the springarm and maybe an overlapping event.
Closest attempt that had the same issue:
I gathered all the hit components of everything that was hit and cast them to a static mesh, then I changed the visibility to false. Next I did a for loop and cycled through an array that I set to null. If I found a null spot I saved the hit component there for later. Also if I found the item already in the array I would exit. Then if the hit result from the line cast returned false I would cycle through the array of objects I set to false visibility and change them back to true and set their array index back to null. The problem with this is that so long as I hit something it doenst set anything back to visible. This is a problem when I am in a house or something similar.
I really want to make a mod for Divinity but the amount of work I want to put into the mod I would like to sell it as a standalone game so I am trying to get the camera of most top down rpgs set up. Diablo, POE, Divinity ect. Thanks for the help, sorry for the long post.