示例#1
0
        public void MovePivotAlongSurface(DirectionTravelling direction, float distance)
        {
            Vector3 v = OrientationHelper.GetSurfaceVectorTowardsRight(Pivot.transform);

            if (direction == DirectionTravelling.Left)
            {
                v = -v;
            }

            Vector3 movement = v.normalized * distance;

            UpdatePivot = false;
            Pivot.transform.Translate(movement, Space.World);
        }