Ejemplo n.º 1
0
        virtual public void GrabBegin(Grabber hand, Collider grabPoint)
        {
            m_grabbedBy       = hand;
            m_grabbedCollider = grabPoint;
            gameObject.GetComponent <Rigidbody>().isKinematic = true;

            // Color-changing support.
            SetColor(COLOR_GRAB);
        }
Ejemplo n.º 2
0
        virtual public void GrabEnd(Vector3 linearVelocity, Vector3 angularVelocity)
        {
            Rigidbody rb = gameObject.GetComponent <Rigidbody>();

            rb.isKinematic     = m_grabbedKinematic;
            rb.velocity        = linearVelocity;
            rb.angularVelocity = angularVelocity;
            m_grabbedBy        = null;
            m_grabbedCollider  = null;

            // Color-changing support.
            SetColor(m_color);
        }
Ejemplo n.º 3
0
 private void Awake()
 {
     m_grabber = GetComponent <Grabber>();
 }