addTorque method

  1. @override
void addTorque(
  1. int body,
  2. Vector3 torque
)
override

Turns body for the next step (N·m).

Implementation

@override
void addTorque(int body, Vector3 torque) {
  if (!_dynamic(body)) return;
  JPH_BodyInterface_AddTorque(_bodyInterface, _id(body), _vec(_v1, torque));
  JPH_BodyInterface_ActivateBody(_bodyInterface, _id(body));
}