コード例 #1
0
ファイル: TransformDT.cs プロジェクト: RobboVariwn/VarBot
 public static TransformDT Zero(this TransformDT self)
 {
     self = new TransformDT();
     self.PositionDT.Zero();
     self.RotationDT.Zero();
     self.ScaleDT.Zero();
     return(self);
 }
コード例 #2
0
ファイル: TransformDT.cs プロジェクト: RobboVariwn/VarBot
        public static TransformDT ToLocalTransformDT(this Transform self)
        {
            TransformDT transformDt = new TransformDT();

            transformDt.PositionDT.SetVector3(self.localPosition);
            transformDt.RotationDT.SetQuaternion(self.localRotation);
            transformDt.ScaleDT.SetVector3(self.localScale);
            return(transformDt);
        }
コード例 #3
0
ファイル: TransformDT.cs プロジェクト: RobboVariwn/VarBot
 public static void ToLocalTransformUnity(this TransformDT self, Transform transform)
 {
     transform.localPosition = new Vector3(self.PositionDT.x, self.PositionDT.y, self.PositionDT.z);
     transform.localRotation = new Quaternion(self.RotationDT.x, self.RotationDT.y, self.RotationDT.z, self.RotationDT.w);
     //transform.localScale = new Vector3(self.ScaleDT.x, self.ScaleDT.y, self.ScaleDT.z);
 }