Skip to content

Commit

Permalink
Merge pull request godotengine#51991 from requizm/fix/51990
Browse files Browse the repository at this point in the history
Fix 3d animations doesn't play
  • Loading branch information
fire authored Aug 23, 2021
2 parents b4cea10 + e4b29cb commit bb1c930
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scene/resources/animation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,11 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {

const real_t *r = values.ptr();

tt->transforms.resize(vcount / 12);
int transform3d_size = (int)sizeof(Transform3D);

for (int i = 0; i < (vcount / 12); i++) {
tt->transforms.resize(vcount / transform3d_size);

for (int i = 0; i < (vcount / transform3d_size); i++) {
TKey<TransformKey> &tk = tt->transforms.write[i];
const real_t *ofs = &r[i * 12];
tk.time = ofs[0];
Expand Down

0 comments on commit bb1c930

Please sign in to comment.