// Start is called before the first frame update void Start() { initialRotation = transform.localRotation; switch (axis) { case RotationAxis.X: axisMotion = joint.X; break; case RotationAxis.Y: axisMotion = joint.Y; break; case RotationAxis.Z: axisMotion = joint.Z; break; default: break; } }
// Start is called before the first frame update void Start() { switch (axis) { case RotationAxis.X: fromMotion = from.X; toMotion = to.X; break; case RotationAxis.Y: fromMotion = from.Y; toMotion = to.Y; break; case RotationAxis.Z: fromMotion = from.Z; toMotion = to.Z; break; default: break; } }