コード例 #1
0
 protected virtual void Start()
 {
     m_startWasCalled = true;
     //deal with nasty script order of execution bug. Order of Start call is random so force rigid bodies to be in the world before constraint is added
     if (!m_thisRigidBody.isInWorld)
     {
         m_thisRigidBody.Start();
     }
     if (m_constraintType == ConstraintType.constrainToAnotherBody && !m_otherRigidBody.isInWorld)
     {
         m_otherRigidBody.Start();
     }
     AddToBulletWorld();
 }