/// <summary> /// Constructs a new constraint which attempts to restrict the angular velocity or orientation to a goal. /// </summary> /// <param name="entity">Affected entity.</param> public SingleEntityAngularMotor(Entity entity) { Entity = entity; settings = new MotorSettingsOrientation(this) { servo = { goal = base.entity.orientation } }; //Since no target relative orientation was specified, just use the current relative orientation. Prevents any nasty start-of-sim 'snapping.' //mySettings.myServo.springSettings.stiffnessConstant *= .5f; }
/// <summary> /// Constructs a new constraint which attempts to restrict the angular velocity or orientation to a goal. /// This constructor will make the angular motor start with isActive set to false. /// </summary> public SingleEntityAngularMotor() { settings = new MotorSettingsOrientation(this); IsActive = false; }