Ejemplo n.º 1
0
 public void SetTailTransform(ChainTransform transform)
 {
     if (m_chainTail)
     {
         m_chainTail.transform.position = transform.Position;
         m_chainTail.transform.rotation = transform.Rotation;
     }
 }
Ejemplo n.º 2
0
 public void SetHeadTransform(ChainTransform transform)
 {
     if (m_chainHead)
     {
         m_chainHead.transform.position = transform.Position;
         m_chainHead.transform.rotation = transform.Rotation;
         Vector3 dir  = m_chainHead.transform.position - m_chainTail.transform.position;
         float   dist = dir.magnitude;
         if (dist > m_maxChainLength)
         {
             m_chainHead.transform.position = dir.normalized * m_maxChainLength + m_chainTail.transform.position;
         }
     }
 }
Ejemplo n.º 3
0
 public void SetTransforms(ChainTransform tailTransform, ChainTransform headTransform)
 {
     SetTailTransform(tailTransform);
     SetHeadTransform(headTransform);
 }