Modifica per aggiornare la rotazione (non Funziona)

This commit is contained in:
2026-06-20 20:39:48 +02:00
parent a1441cc28e
commit 7fee7b1e13
4 changed files with 12 additions and 2 deletions
+6 -1
View File
@@ -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});
}
+2 -1
View File
@@ -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++;
}
}
+4
View File
@@ -81,6 +81,10 @@ void State::update(){
std::vector<JointInterface*> collJoints;
*/
for (auto i : collections){
i->update();
}
for (auto i : createdColl){
if (play){
for (auto j : i.pieces){