code: public void addConstraint(final GVRConstraint gvrConstraint) {
          mPhysicsContext.runOnPhysicsThread(new Runnable() {
              @Override
              public void run() {
                  if (contains(gvrConstraint)) {
                      return;
                  }
  
                  if (!contains(gvrConstraint.mBodyA)
                          || (gvrConstraint.mBodyB != null && !contains(gvrConstraint.mBodyB))) {
                      throw new UnsupportedOperationException("Rigid body not found in the physics world.");
                  }
  
                  NativePhysics3DWorld.addConstraint(getNative(), gvrConstraint.getNative());
                  mPhysicsObject.put(gvrConstraint.getNative(), gvrConstraint);
              }
          });
      }
docs: Add a {@link GVRConstraint} to this physics world.
  
  @param gvrConstraint The {@link GVRConstraint} to add.