Limiting The Area Which A Force Can Influence and Toggling Gravity Upon Collision

Hey guys this is my first post :slight_smile: so please excuse my noobiness,

In my program I generate a 2 dimensional plane consisting out of small adjacent cubes of size 1. Right now I have a 30*30 grid of adjacent cubes with a static ground beneath. If I exert a force on 1 of the cubes it starts a chain reaction and eventually causes all 900 cubes to move about, which results in 5 fps :P. So is there any way I can stop the chain reaction after a radius of x blocks? Like toggling objects to act dynamically within a certain radius of the impact point and having all other blocks be static by default? Furthermore id like gravity to be enabled for the collisions, but if enable gravity for all 900 of them, even though the cubes are at rest,my game runs at 5 fps again (why is that?). So following the same idea as before is there some way I can toggle gravity for all cubes involved in collision within a predefined radius?

Thanks!

well you could create a large box collider, the size of the area you want affected, on collison it spawns there, and for every cube inside it it unfreezes them. To freeze the cubes, just toggle the freeze position functions on all of them, then even if something hits them they won’t move.