- Home /
Custom brush tool?
Hello all,
I need some help making a tool for the editor. The goal is the have a brush that can be used to paint vegetation on terrain similar to how it is demonstrated in this video (16:47 if the timestamp doesn't work). Ideally I would have a custom mesh on the "terrain" layer (as opposed to using the Terrain object), raycast on that layer, and hold left click to "paint" a collection of vegetation, with the possibility of a simple undo/redo system tracking strokes.
I've begun some of the work and made a spot in the editor using the MenuItem tags, but I'm not sure how to set it up beyond that. Should I make a unique editor window? Some sort of ScriptableObject for the brush? And for drawing the brush? Am I relying on handles? Can I use some sort of shader to have it follow the terrain like in the video?
I can figure out that math for technique for the spawning of the vegetation but I could use some help with how to properly set this up within the editor. Thanks in advance.