Update transform member structure in base.hpp#194
Conversation
Fixes issue where flecs-explorer inproperly displays transform component
WalkthroughThe ChangesTransform Generation Field Exposure
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@code/framework/src/world/modules/base.hpp`:
- Line 184: The metadata registration for Transform is misordered:
_transform.member<uint16_t>("generation").member<glm::vec3>("pos").member<glm::quat>("rot").member<glm::vec3>("vel")
registers rot before vel but the Transform struct declares vel before rot;
update the chain on _transform to register "vel" before "rot" (i.e.
...member<glm::vec3>("pos").member<glm::vec3>("vel").member<glm::quat>("rot"))
so Flecs inspector metadata matches the Transform struct layout.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bd8badfc-6678-4fc0-ac8c-97940ca990f7
📒 Files selected for processing (1)
code/framework/src/world/modules/base.hpp
Fixes issue where flecs-explorer inproperly displays transform component.
With this change it displays everything properly, otherwise "glm::vec3::z" would be displayed as "w" component in rotation
Summary by CodeRabbit