Пример #1
0
 private void Start()
 {
     m_velocityTracker = this.GetComponent <VelocityTracker>();
     m_lastPos         = transform.position;
     m_lastRot         = transform.rotation;
     m_parentTransform = gameObject.transform.parent.transform;
 }
Пример #2
0
        private void Start()
        {
            m_velocityTracker = this.GetComponent <VelocityTracker>();
            m_lastPos         = transform.position;
            m_lastRot         = transform.rotation;
            m_parentTransform = gameObject.transform.parent.transform;

            Vector3 gripOff = m_gripTransform.transform.position - transform.position;

            m_diff = Quaternion.Inverse(transform.rotation) * gripOff;
        }