Modifica per aggiornare la rotazione (non Funziona)
This commit is contained in:
Binary file not shown.
@@ -75,5 +75,10 @@ bool Lower_Body::setTransparency(float alpha){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Lower_Body::update(){
|
void Lower_Body::update(){
|
||||||
|
float sxAcc = sx->getZ_Acc();
|
||||||
|
float dxAcc = dx->getZ_Acc();
|
||||||
|
|
||||||
|
float totAcc = sxAcc + dxAcc;
|
||||||
|
|
||||||
|
t->body.setTanAcc({0,totAcc,0});
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,8 @@ void rigidbody::calcRot(const float Dtime){
|
|||||||
|
|
||||||
i=0;
|
i=0;
|
||||||
for (auto axes : rot){
|
for (auto axes : rot){
|
||||||
axes += 0.5 * tmpTanAcc[i] * pow(Dtime,2);
|
rot[i] = axes + (0.5 * tmpTanAcc[i] * pow(Dtime,2));
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,6 +81,10 @@ void State::update(){
|
|||||||
std::vector<JointInterface*> collJoints;
|
std::vector<JointInterface*> collJoints;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
for (auto i : collections){
|
||||||
|
i->update();
|
||||||
|
}
|
||||||
|
|
||||||
for (auto i : createdColl){
|
for (auto i : createdColl){
|
||||||
if (play){
|
if (play){
|
||||||
for (auto j : i.pieces){
|
for (auto j : i.pieces){
|
||||||
|
|||||||
Reference in New Issue
Block a user