Пример #1
0
            public void SetSlaveActive(bool active)
            {
                if (active)
                {
                    // Teleport
                    model.slave.wrist.transformRef.position = model.master.wrist.transformRef.position;
                    model.slave.wrist.transformRef.rotation = model.master.wrist.transformRef.rotation;

                    // Physics
                    PhysHelpers.SetHandPhysics(model, active);

                    // Module
                    HandPhysicsHandler handPhysics = BasicHelpers.FindHandler <HandPhysicsHandler>(model.relatedHandlers.ToArray());
                    handPhysics.viewModel.isActive = active;
                }
                else
                {
                    // Module
                    HandPhysicsHandler handPhysics = BasicHelpers.FindHandler <HandPhysicsHandler>(model.relatedHandlers.ToArray());
                    handPhysics.viewModel.isActive = active;

                    // Physics
                    PhysHelpers.SetHandPhysics(model, active);
                }

                // Visuals
                model.slave.skinnedMR.enabled = active;
            }
Пример #2
0
            public void SetMasterActive(bool active)
            {
                // Module
                InputHandler input = BasicHelpers.FindHandler <InputHandler>(model.relatedHandlers.ToArray());

                input.viewModel.isActive = active;

                // Visuals
                model.master.skinnedMR.enabled = active;
            }