1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

do it properly

This commit is contained in:
Lars Mueller 2025-01-26 01:37:39 +01:00
parent 704821c41e
commit a5180fbb28
5 changed files with 33 additions and 75 deletions

View file

@ -319,8 +319,10 @@ public:
return transform;
if (std::holds_alternative<core::matrix4>(transform)) {
// TODO raise a warning: Attempt to animate a static joint.
return transform;
// .x lets animations override matrix transforms entirely.
core::Transform trs;
keys.updateTransform(frame, trs);
return {trs};
}
auto trs = std::get<core::Transform>(transform);
@ -346,7 +348,7 @@ public:
// The .x and .gltf formats pre-calculate this
std::optional<core::matrix4> GlobalInversedMatrix;
// TODO friends?
u16 JointID; // TODO refactor away: pointers -> IDs
std::optional<u16> ParentJointID;
@ -357,7 +359,7 @@ public:
core::aabbox3df calculateBoundingBox(
const std::vector<core::matrix4> &global_transforms);
void recalculateBaseBoundingBoxes();
const std::vector<SJoint *> &getAllJoints() const {