private void OnOtherJointRotated(LampJoint otherJoint, int deltaAngle) { // Rotate the joint in the opposite direction of "otherJoint" joint.Rotate(-deltaAngle); }
public void SetOffset(int offset) { offset = Mathf.Clamp(offset, -maxOffset, maxOffset); joint?.Rotate(offset - Offset); Offset = offset; }