diff --git a/build/bin/mainV8.exe b/build/bin/mainV8.exe index 1b6ac81..805133e 100644 Binary files a/build/bin/mainV8.exe and b/build/bin/mainV8.exe differ diff --git a/src/collections/methods/lower_body.cpp b/src/collections/methods/lower_body.cpp index 9803bd1..71cac6a 100644 --- a/src/collections/methods/lower_body.cpp +++ b/src/collections/methods/lower_body.cpp @@ -75,5 +75,10 @@ bool Lower_Body::setTransparency(float alpha){ } void Lower_Body::update(){ - + float sxAcc = sx->getZ_Acc(); + float dxAcc = dx->getZ_Acc(); + + float totAcc = sxAcc + dxAcc; + + t->body.setTanAcc({0,totAcc,0}); } \ No newline at end of file diff --git a/src/rigidbody/methods/rb_class.cpp b/src/rigidbody/methods/rb_class.cpp index 7b0fb78..dfaa7b0 100755 --- a/src/rigidbody/methods/rb_class.cpp +++ b/src/rigidbody/methods/rb_class.cpp @@ -128,7 +128,8 @@ void rigidbody::calcRot(const float Dtime){ i=0; for (auto axes : rot){ - axes += 0.5 * tmpTanAcc[i] * pow(Dtime,2); + rot[i] = axes + (0.5 * tmpTanAcc[i] * pow(Dtime,2)); + i++; } } diff --git a/src/sfml_util.cpp b/src/sfml_util.cpp index 30a9cb6..0547348 100644 --- a/src/sfml_util.cpp +++ b/src/sfml_util.cpp @@ -81,6 +81,10 @@ void State::update(){ std::vector collJoints; */ + for (auto i : collections){ + i->update(); + } + for (auto i : createdColl){ if (play){ for (auto j : i.pieces){