Пример #1
0
        public override void Update()
        {
            base.Update();

            if (Input.Keys.JustPressed(Keys.Space) || Input.Keys.Pressed(Keys.LeftControl))
            {
                SpawnCubeAtPosition(Camera.Main.Transform.Position, Camera.Main.Transform.Forward);
            }

            if (m_VRService != null && m_RightHand != null && m_VRService.GetButtonDown(1, XRButton.Trigger))
            {
                SpawnCubeAtPosition(m_RightHand.Position, m_RightHand.Forward);
            }

            if (m_VRService != null && m_LeftHand != null && m_VRService.GetButtonDown(0, XRButton.Trigger))
            {
                SpawnCubeAtPosition(m_LeftHand.Position, m_LeftHand.Forward);
            }
        }
Пример #2
0
        public override void Update()
        {
            base.Update();

            if (Input.Keys.JustPressed(Keys.Space))
            {
                SpawnLightAt(m_Transform.Position);
            }

            if (m_VRService != null && m_RightHand != null && m_VRService.GetButtonDown(1, XRButton.Trigger))
            {
                SpawnLightAt(m_RightHand.Position);
            }
        }