Posted July 16, 20205 yr how many collision boxes could exist before slowing things down too much? If there were 16 CB in a block that might have 500 in a chunk how bad would be the speed hit? Or is pointless to worry about it?
July 16, 20205 yr It's not necessarily how many collision boxes there are, its more of how complex the shape is. The most complex shape a collision box could have 2048 boxes. These would not intersect and create new boxes. This many boxes would probably drop the speed yes, but more in specific circumstances. The collision boxes mostly matter when constructing and destroying the block. This is when the collision boxes get updated so breaking many in succession quickly would cause lag. However, a bunch of them existing in the world wouldn't really cause a slow down. As a person who's generated complex collision boxes in large quantities, here is my take on collision boxes. You want to try and reduce the complexity as much as possible. Also, they should be initialized only once using a variable so that the calculations aren't done every time the block is created/destroyed. You can have as many generate as you want. Just realize that you have to balance the complexity of your shape with the efficiency of harvesting and placement in the world.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.