diff --git a/build/bin/mainV7.exe b/build/bin/mainV7.exe index dce1329..eff0607 100644 Binary files a/build/bin/mainV7.exe and b/build/bin/mainV7.exe differ diff --git a/src/collections/methods/gamba.cpp b/src/collections/methods/gamba.cpp index 4e51667..941f717 100644 --- a/src/collections/methods/gamba.cpp +++ b/src/collections/methods/gamba.cpp @@ -15,8 +15,8 @@ Gamba::Gamba(rb::Vector3 pos, unsigned int* dataPos, std::string cosciaData, std sensori.push_back(new Sensore (rb::Vector3{pos[0],pos[1],pos[2]+200},_Float16( 0.2 ),dataPos,caviglia)); // modifico la rotazione relativa della gamba - sensori[0]->body.setRot({_Float16 (1.3),_Float16 (1.7),0}); - sensori[1]->body.setRot({_Float16 (1.8),_Float16 (1.7),0}); + sensori[0]->body.setRot({_Float16 (1.5708),_Float16 (1.5708),0}); + sensori[1]->body.setRot({_Float16 (1.5708),_Float16 (1.5708),0}); joints.push_back(new RigidJoint(sensori[0], {pezzi[0]})); joints.push_back(new PivotJoint(sensori[0], {sensori[1]}, rb::Vector3{0,0,100})); diff --git a/src/collections/methods/lower_body.cpp b/src/collections/methods/lower_body.cpp index cdde8d7..8608f31 100644 --- a/src/collections/methods/lower_body.cpp +++ b/src/collections/methods/lower_body.cpp @@ -17,7 +17,7 @@ Lower_Body::Lower_Body(rb::Vector3 pos,std::vector data){ collection Lower_Body::create(ReferencePlane plane){ collection coll; - dx->setDirection(Direction::R); + sx->setTransparency(1); dx->setTransparency(1); @@ -25,15 +25,21 @@ collection Lower_Body::create(ReferencePlane plane){ { case ReferencePlane::XZN: dx->setTransparency(0.5); + dx->setDirection(Direction::L); + sx->setDirection(Direction::R); coll = coll + dx->create(plane); coll = coll + sx->create(plane); break; case ReferencePlane::XZ: sx->setTransparency(0.5); + dx->setDirection(Direction::R); + sx->setDirection(Direction::L); coll = coll + sx->create(plane); coll = coll + dx->create(plane); break; case ReferencePlane::YZ: + sx->setDirection(Direction::R); + dx->setDirection(Direction::L); coll = coll + dx->create(plane); coll = coll + sx->create(plane); break; diff --git a/src/pieces/methods/sensore_class.cpp b/src/pieces/methods/sensore_class.cpp index 19d888d..fe9d417 100644 --- a/src/pieces/methods/sensore_class.cpp +++ b/src/pieces/methods/sensore_class.cpp @@ -99,7 +99,7 @@ void Sensore::calcRotWithG(unsigned int index){ // calcolo rotazione con valori float tmpSinZ = -grav[2] / modG; float tmpAX = acos(dir*tmpSinX); - float tmpAY = acos(tmpSinY); + float tmpAY = acos(dir*tmpSinY); float tmpAZ = acos(tmpSinZ); body.setRot(rb::Vector3{tmpAY, tmpAX, tmpAZ });