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