I have my main character set up in the foliage material to affect it based on the character location. This works perfect, but I also have NPCs that walk through foliage and I want them to do the same thing to the Foliage.
At the moment, I have 2 sets of WPO calculations (one for Player and other for the NPC) that are added together. And to get the EnemyLocation value, I’m using GetAllActorsOfClass (enemy BP class). I know the Material set up works, because it works on the 1st enemy I come across (index 0). I’m having trouble getting it to work on all the other enemies I have placed in the world.
Any thoughts on how to do this?