diff --git a/es-core/src/GuiComponent.cpp b/es-core/src/GuiComponent.cpp index 60840fa91..d16652ad5 100644 --- a/es-core/src/GuiComponent.cpp +++ b/es-core/src/GuiComponent.cpp @@ -361,7 +361,7 @@ void GuiComponent::applyTheme(const std::shared_ptr& theme, if (elem->has("rotation")) setRotationDegrees(elem->get("rotation")); if (elem->has("rotationOrigin")) - setRotationOrigin(elem->get("rotationOrigin")); + setRotationOrigin(glm::clamp(elem->get("rotationOrigin"), 0.0f, 1.0f)); } if (properties & ThemeFlags::Z_INDEX && elem->has("zIndex"))