This object is in archive! 

Optimize gravity generator on artificial mass calculations

DeltaWing shared this feedback 7 months ago
Not Enough Votes

When turning on a large quantity of gravity generators with a large quantity of mass blocks in range on the same grid, the CPU usage noticeably spikes, and stays high as long as the gravity generators are on.


To me, this is indicative that it is recalculating the blocks within the field each frame, which is something it doesn't need to do.


My suggestion is this: Instead of recalculating every frame to get the blocks within the field, instead calculate it once and only calculate again if something changes (grid split, gravity generator field radius changed, mass block removed/added, etc)

Leave a Comment
 
Attach a file