setBodyPose method

  1. @override
void setBodyPose(
  1. int body,
  2. Vector3 position,
  3. Quaternion rotation, {
  4. bool wake = true,
})
override

Teleports body. Static bodies are moved this way; kinematic bodies should use moveKinematic so what they touch is carried along.

Implementation

@override
void setBodyPose(
  int body,
  Vector3 position,
  Quaternion rotation, {
  bool wake = true,
}) {
  if (_gone || !_mine(body)) return;
  JPH_BodyInterface_SetPositionAndRotation(
    _bodyInterface,
    _id(body),
    _vec(_v1, position),
    _quat(rotation),
    wake
        ? JPH_Activation.JPH_Activation_Activate
        : JPH_Activation.JPH_Activation_DontActivate,
  );
}