public void Process(Vector2 _offset, float _accuracyUnit, int _pixelBack) { pixelBack = _pixelBack; offset = _offset; accuracyUnit = _accuracyUnit; Vector2 v1 = new Vector2(0, -1); Vector2 v2 = offset; float angle = SWCommon.AngleSigned(v1, v2, new Vector3(0, 0, 1)); matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.Euler(0, 0, angle), Vector3.one); center = new Vector2(0.5f, 0.5f); //dir = offset.normalized; dirHor = SWCommon.RotateVector(offset, new Vector3(0, 0, 90)).normalized; Process(); }