I am trying to rotate an object around it's local axis (In this case a humanoid index finger) with my custom editor.
public float amount;
void OnGUI() {
amount = EditorGUILayout.Slider("Rotate Amount", amount, 0, 100);
index1.transform.localEulerAngles = new Vector3(0, 0, amount);
}
The issue I am having is when I move the slider, the finger rotates down and forward so the tips of the fingers point outwards, when in theory they should point towards the elbow.
I think I am using the wrong type of transform here, so what should I do to use the right transform?