コード例 #1
0
    private void Start()
    {
        // Make sure the base interaction is started
        InitializeBaseInteraction();

        m_VRMgr = GameObject.Find("VRManager").GetComponent <VRManagerScript>();

        m_it = new vrInteractionManipulationHomer(Name);
        // Must tell base class about our interaction
        SetInteraction(m_it);

        MiddleVR.VRInteractionMgr.AddInteraction(m_it);
        MiddleVR.VRInteractionMgr.Activate(m_it);

        m_HandNode = MiddleVR.VRDisplayMgr.GetNode(HandNode);

        if (m_HandNode != null)
        {
            m_it.SetGrabWandButton(WandGrabButton);
            m_it.SetTranslationScale(TranslationScale);
            m_it.SetRotationScale(RotationScale);
            m_it.SetManipulatorNode(m_HandNode);
        }
        else
        {
            MiddleVR.VRLog(2, "[X] VRInteractionManipulationHomer: One or several nodes are missing.");
        }

        m_Wand = this.GetComponent <VRWand>();
    }
コード例 #2
0
    private void Start()
    {
        // Make sure the base interaction is started
        InitializeBaseInteraction();

        m_VRMgr = GameObject.Find("VRManager").GetComponent<VRManagerScript>();

        m_it = new vrInteractionManipulationHomer(Name);
        // Must tell base class about our interaction
        SetInteraction(m_it);

        MiddleVR.VRInteractionMgr.AddInteraction(m_it);
        MiddleVR.VRInteractionMgr.Activate(m_it);

        m_HandNode = MiddleVR.VRDisplayMgr.GetNode( HandNode );

        if ( m_HandNode != null )
        {
            m_it.SetGrabWandButton( WandGrabButton );
            m_it.SetTranslationScale( TranslationScale );
            m_it.SetRotationScale( RotationScale );
            m_it.SetManipulatorNode(m_HandNode);
        }
        else
        {
            MiddleVR.VRLog( 2, "[X] VRInteractionManipulationHomer: One or several nodes are missing." );
        }

        m_Wand = this.GetComponent<VRWand>();
    }