Revision: 7684 http://playerstage.svn.sourceforge.net/playerstage/?rev=7684&view=rev Author: hsujohnhsu Date: 2009-05-16 19:40:11 +0000 (Sat, 16 May 2009)
Log Message: ----------- move gravity option to Init(). Modified Paths: -------------- code/gazebo/trunk/server/physics/Body.cc Modified: code/gazebo/trunk/server/physics/Body.cc =================================================================== --- code/gazebo/trunk/server/physics/Body.cc 2009-05-16 19:21:09 UTC (rev 7683) +++ code/gazebo/trunk/server/physics/Body.cc 2009-05-16 19:40:11 UTC (rev 7684) @@ -246,13 +246,6 @@ childNode = childNode->GetNextByNSPrefix("sensor"); } - // If no geoms are attached, then don't let gravity affect the body. - if (this->geoms.size()==0 || this->turnGravityOffP->GetValue()) - { - //std::cout << "setting gravity to zero for: " << this->nameP->GetValue() << std::endl; - this->SetGravityMode(false); - } - this->SetPose(initPose); } @@ -367,6 +360,12 @@ // Initialize the body void Body::Init() { + // If no geoms are attached, then don't let gravity affect the body. + if (this->geoms.size()==0 || this->turnGravityOffP->GetValue()) + { + this->SetGravityMode(false); + } + // Set the intial pose. Must do this to handle static models this->SetPose(this->GetPose()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit