Ejemplo n.º 1
0
    private bool AlreadyAligned(Transform trans)
    {
        bool inPlace = (trans.position - grid.AlignVector3(trans.position, trans.lossyScale) + alignOffset).sqrMagnitude < 0.0001;
        bool rotated = rotateTransform ? Quaternion.Angle(gTrnsfrm.rotation, trans.rotation) < 0.0001 : true;

        return(inPlace && rotated);
    }
Ejemplo n.º 2
0
 void OnDrawGizmos()
 {
     if (!debugPoints)
     {
         return;
     }
     Gizmos.color = Color.green;
     Gizmos.DrawSphere(point, 0.3f);                           // where the plyer is pointing at
     Gizmos.color = Color.red;
     Gizmos.DrawSphere(grid.AlignVector3(point, scale), 0.3f); // the aligned point
 }
Ejemplo n.º 3
0
 private bool AlreadyAligned(Transform trans)
 {
     return((trans.position - grid.AlignVector3(trans.position, trans.lossyScale)).sqrMagnitude < 0.0001);
 }