SpacePlatform.find_asteroid_chunks_filtered add radius option
Posted: Sat Dec 14, 2024 7:31 pm
Hello,
I am trying to find asteroids on a space platform and read that there was a position option, but read over it the "radius" field does not exist, causing some confusion in usage. Similar functions for searching do have the radius option ("find_entities_filtered"). Expected usage;
For now I replaced it with an area search like this;
I think not the highest priority as the area search works, if someone also has the same issue hopefully this post helps them as well.
I am trying to find asteroids on a space platform and read that there was a position option, but read over it the "radius" field does not exist, causing some confusion in usage. Similar functions for searching do have the radius option ("find_entities_filtered"). Expected usage;
Code: Select all
local AsteroidChunkList = SpacePlatform.find_asteroid_chunks_filtered({
position = RadarEntity.position,
radius = Distance
})
Code: Select all
local XPos = RadarEntity.position.x
local YPos = RadarEntity.position.y
local AsteroidChunkList = SpacePlatform.find_asteroid_chunks_filtered({
area = {{XPos-Distance, YPos-Distance}, {XPos+Distance, XPos+Distance}}
})