- Home /
Sort of the same as a answer to another question.
How to count Tiles in a sourinding Area around an Object?
I want a object ,that is locked to grid ,to count all tiles, called "field",surounding it with a radius of 3 and than add to a public float called "grain"... roughly like this:
void Update()
{
waitInt++;
if(waitInt==100)
{
waitInt=0;
grain += countedFields;
}
}
How can I get countedFields?
What do you mean by "locked to grid"?
How did you achieve that?
How do you keep track of all the tiles?
1.the object is a child of a tilemap. 2". 3. Until now I havent figured it out and I thinkh i am just gonna do a physics overlapcircle of sth alike
Answer by Oelbert · Jan 11, 2019 at 10:39 PM
Thanks. Because of the difference in words, I wouldnt have found it on my own :)
Follow this Question
Related Questions
Interact with tile / triggering script 1 Answer
How to get adjcent tiles (horizontal or vertical) in an isometric tilemap ? 1 Answer
How to store tile data for placing tiles 2 Answers
2d isometric tile map with 3d models (Shadowrun,Bastion inspired) 2 Answers
How do you get the tile on which a gameObject is standing on Isometric Tilemap ? 1 Answer