feat(editor): random rotation, placed object list, quality of life

- Random Rotation checkbox: each placed object gets a random Y rotation
  (great for natural-looking tree/rock placement without manual tweaking)
- Placed Object List: collapsible list in Object panel showing all placed
  objects with name and position, click to select
- Both features reduce repetitive manual work when building dense zones
This commit is contained in:
Kelsi 2026-05-05 04:57:42 -07:00
parent 89312120f4
commit 5df007b7b9
3 changed files with 34 additions and 1 deletions

View file

@ -25,7 +25,13 @@ void ObjectPlacer::placeObject(const glm::vec3& position) {
obj.nameId = 0;
obj.uniqueId = nextUniqueId();
obj.position = position;
obj.rotation = glm::vec3(0.0f, placementRotY_, 0.0f);
float rotY = placementRotY_;
if (randomRotation_) {
static std::mt19937 rng(42);
std::uniform_real_distribution<float> dist(0.0f, 360.0f);
rotY = dist(rng);
}
obj.rotation = glm::vec3(0.0f, rotY, 0.0f);
obj.scale = placementScale_;
obj.selected = false;