setMotorSpeed method

void setMotorSpeed(
  1. double value,
  2. int wheelIndex
)

Set the target rotational speed of the hinge constraint.

Implementation

void setMotorSpeed(double value, int wheelIndex) {
  final hingeConstraint = constraints[wheelIndex];
  hingeConstraint.enableMotor();
  hingeConstraint.motorTargetVelocity = value;
}