setSteeringValue method

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

Set the steering value of a wheel. @todo check coordinateSystem

Implementation

void setSteeringValue(double value, int wheelIndex) {
  // Set angle of the hinge axis
  final axis = wheelAxes[wheelIndex];

  final c = math.cos(value);
  final s = math.sin(value);
  final x = axis.x;
  final z = axis.z;
  constraints[wheelIndex].axisA.set(-c * x + s * z, 0, s * x + c * z);
}