The problem is that the remove instance function does not actually remove an instance or the right instance when playing in a packaged game. It will work perfectly if you play in the editor but in a packaged game it causes big lag spikes and removes the wrong instance if any. When working in C++ I got it removing instances but it always removed the wrong instance even though it removed the correct instance when playing in the editor.
To reproduce this simply load of a UE project in UE 4.19.2. I’m using C++ 3rd person project.
- Add some foliage to the level I used the starter content rock model.
- Make sure overlap events work with it you may need to set it to overlap all dynamic and add a box collision in the meshes collision settings.
- In your Third Person, BP Make event Overlap and from the sweep results cast the component to instanced static mesh component and from there remove the hit item.
- Play in the editor and everything will work fine but if you play in a packaged game or in window launched game the removing of instances will be unreliable and slow your computer down a lot. Often it won’t remove anything.
Here is my BP I also have done this in C++ and I’m getting very similar results.
In Editor (Instances REmoved Component Functions As Intended)
Packaged Game (Component Does Not Work)
I will try and a few other engine versions and post my finding here.