addBody method

int addBody(
  1. BodyKind kind,
  2. int key, {
  3. Vec3 position = Vec3.zero,
  4. Quat rotation = Quat.identity,
})

Adds a body at position and rotation, with key to know it by in movedKey, and returns its id.

Implementation

int addBody(BodyKind kind, int key, {Vec3 position = Vec3.zero, Quat rotation = Quat.identity}) {
  _writePose(position, rotation);
  _check(fp_body_add(_live, kind.index, key, _pose.ref, _id));
  return _id.value;
}