setSleepingAllowed method

void setSleepingAllowed (bool flag)

You can disable sleeping on this body. If you disable sleeping, the body will be woken.

@param flag

Implementation

void setSleepingAllowed(bool flag) {
  if (flag) {
    _flags |= AUTO_SLEEP_FLAG;
  } else {
    _flags &= ~AUTO_SLEEP_FLAG;
    setAwake(true);
  }
}