mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
feat(editor): brush radius circle indicator on terrain
- Yellow circle renders at cursor position showing brush radius - Visible in Sculpt, Paint, and Water modes - Built from 48-segment quad strip slightly above terrain surface - Renders through the water pipeline (alpha-blended, depth-tested) - Disappears when cursor leaves terrain or in Object/NPC modes - Brush VB cleaned up properly on shutdown
This commit is contained in:
parent
d28c5ec842
commit
6e24e08818
4 changed files with 95 additions and 0 deletions
|
|
@ -386,6 +386,13 @@ void EditorApp::updateTerrainEditing(float dt) {
|
|||
viewport_.clearGhostPreview();
|
||||
}
|
||||
|
||||
// Brush circle indicator for sculpt/paint/water modes
|
||||
if (mode_ == EditorMode::Sculpt || mode_ == EditorMode::Paint || mode_ == EditorMode::Water) {
|
||||
viewport_.setBrushIndicator(hitPos, terrainEditor_.brush().settings().radius, true);
|
||||
} else {
|
||||
viewport_.setBrushIndicator(hitPos, 0, false);
|
||||
}
|
||||
|
||||
if (painting_ && terrainEditor_.brush().settings().mode == BrushMode::Flatten) {
|
||||
static bool flattenSet = false;
|
||||
if (!flattenSet) {
|
||||
|
|
@ -396,6 +403,7 @@ void EditorApp::updateTerrainEditing(float dt) {
|
|||
}
|
||||
} else {
|
||||
terrainEditor_.brush().setActive(false);
|
||||
viewport_.setBrushIndicator({}, 0, false);
|
||||
viewport_.clearGhostPreview();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue