Пример #1
0
 public void StoreNewTransformValues()
 {
     _newValues = new TransformValues()
     {
         Position = _transform.position, Rotation = _transform.rotation, Scale = _transform.localScale
     };
 }
Пример #2
0
 public void StoreNewTransformValues()
 {
     mNewValues = new TransformValues()
     {
         position = mTransform.position, rotation = mTransform.rotation, scale = mTransform.localScale
     };
 }
    public static TransformValues GetWorldTransformValues(this Transform src)
    {
        TransformValues values = new TransformValues();

        values.Position   = src.position;
        values.Rotation   = src.rotation;
        values.LocalScale = src.localScale;
        return(values);
    }
Пример #4
0
        public TransformCommand(TransformGizmo transformGizmo, Transform transform)
        {
            this._transformGizmo = transformGizmo;
            this._transform      = transform;

            _oldValues = new TransformValues()
            {
                Position = transform.position, Rotation = transform.rotation, Scale = transform.localScale
            };
        }
Пример #5
0
        public TransformCommand(TransformGizmo transformGizmo, Transform transform)
        {
            this.mTransformGizmo = transformGizmo;
            this.mTransform      = transform;

            mOldValues = new TransformValues()
            {
                position = transform.position, rotation = transform.rotation, scale = transform.localScale
            };
        }
Пример #6
0
 private void Start()
 {
     maxAllowedSizeChange = 1.3f;
     touchIsOverUI        = false;
     hitGrid                   = false;
     paintManager              = GameObject.FindWithTag("PaintManager").GetComponent <PaintManager>();
     paintTarget               = GameObject.FindWithTag("PaintTarget");
     PaintingPlane             = GameObject.FindWithTag("CamPaintingPlane");
     localPlaneTransformValues = new TransformValues();
     localPlaneTransformValues.TransferValues(PaintingPlane.transform);
 }
 public static void SetFromWorldTransformValuesExceptScale(this Transform dst, TransformValues values)
 {
     dst.position = values.Position;
     dst.rotation = values.Rotation;
     // Ignoring scale
 }
 public static void SetFromLocalTransformValues(this Transform dst, TransformValues values)
 {
     dst.localPosition = values.Position;
     dst.localRotation = values.Rotation;
     dst.localScale    = values.LocalScale;
 }