- Home /
Splatmap question
Is there an efficient way to detect the nearest area that contains that splatmap value.
Answer by Tom163 · Feb 02, 2015 at 09:06 AM
Yes, you can access the splatmap programmatically, and read from it. You would need to convert screen location to splatmap location, but since you know the world coordinates and size of a terrain (from transform), that's possible as well.
The command you want is something like this:
float[,,] splatmapData = terrain.GetAlphamaps(0, 0, w, h);
where w and h are width and height of the splatmap / control texture.
For a better answer you would need to describe in more detail what exactly it is you want to do.
Your answer
Follow this Question
Related Questions
Help with moving AI object to nearest spawned objects position 0 Answers
Is this a bug or a my misunderstanding how terrain textures work? 0 Answers
Unity terrain paints black squares 0 Answers
GUI label dimensions bug 2 Answers
Is there a way to check for a line as opposed to a Vector3 point with Bounds.Contains? 1 Answer