This is my current Blueprint script.
It is meant to simulate objects in space gaining mass, gravity strength, and gravity range when they are grouped together. Example of it working is shown in these two pictures…
My issue is that when I add enough of these cubes, I get an infinite loop detection and I cannot run the game. I understand that as they gain gravity range, they will keep pulling in more objects which will then gain gravity range and this will loop. This is what I want it to do but maybe there is a better way to avoid the infinite loop problem, or maybe a better way in general?
Question 2: Once I get this working, I want to create an algorithm for the game to find the average x, y, and z location values for every block in a group and disable their individual gravity bubbles and replace them with one large gravity bubble using those coordinates for a center mass. The idea is planet creation starting from small pieces. I am pretty new with the engine especially with communication between multiple blueprints. If anyone has any insight, I would really appreciate it!