From c5e8d7554d5151f200d397b45d51bc08868d1cdc Mon Sep 17 00:00:00 2001 From: devZoGok Date: Sun, 10 Sep 2023 11:16:44 +0300 Subject: [PATCH] updating quad's size instead of scaling --- mapEditorAppState.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mapEditorAppState.cpp b/mapEditorAppState.cpp index 63e641a..c2713df 100644 --- a/mapEditorAppState.cpp +++ b/mapEditorAppState.cpp @@ -150,8 +150,10 @@ namespace battleship{ break; } - Vector3 scale = selectedTerrainNode->getScale() + 10 * strength * Vector3(axis.x, 1, axis.y); - selectedTerrainNode->setScale(scale); + Quad *quad = (Quad*)selectedTerrainNode->getMesh(0); + Vector3 size = quad->getSize() + 10 * strength * Vector3(axis.x, axis.y, 0); + quad->setSize(Vector3(size.x, size.y, 1)); + quad->updateVerts(quad->getMeshBase()); } void MapEditorAppState::MapEditor::pushLandmassVerts(float strength){