what´s the most efficient way to do it? right now i get all blocks in a cube, check their cordinates 1 by one and if they are a certain distant away from the center of the sphere i consider them, but if i wanted to for example, get the blocks that are eaxctly 5 blocks away from certain point it isnt very efficient, so is there a better way?
#Getting blocks onna set radius
1 messages · Page 1 of 1 (latest)
there could be a cleaner way to do that without you writing a loop by using a mathematical expression for a sphere and filtering an rray of block based on that - which is essentially doing what you mentioned , but in the background. another way would be to do raycasts in all directions. however this would probably be less performant and you would need more raycasts for bigger sphere sizes