void UpdateSimple()
        {
            if (input == null || !input.focused || !input.enabled)
            {
                return;
            }

            bool leftAltPressed     = input.GetButton(InputButtonNames.LeftAlt);
            bool leftShiftPressed   = input.GetButton(InputButtonNames.LeftShift);
            bool leftControlPressed = input.GetButton(InputButtonNames.LeftControl);
            bool fire1Pressed       = input.GetButton(InputButtonNames.Button1);

            if (fire1Pressed)
            {
                if (ModelPreviewCancel())
                {
                    fire1Pressed         = false;
                    lastHitButtonPressed = Time.time + 0.5f;
                }
            }

            bool fire2Clicked = input.GetButtonDown(InputButtonNames.Button2);

            if (!leftShiftPressed && !leftAltPressed && !leftControlPressed)
            {
                if (Time.time - lastHitButtonPressed > player.hitDelay)
                {
                    if (fire1Pressed)
                    {
                        DoHit(player.hitDamage);
                    }
                }

                if (fire2Clicked)
                {
                    DoBuild(curPos, transform.forward, crosshairHitInfo.voxelCenter);
                }
            }

            if (input.GetButtonDown(InputButtonNames.Build))
            {
                env.SetBuildMode(!env.buildMode);
                if (env.buildMode)
                {
                                        #if UNITY_EDITOR
                    env.ShowMessage("<color=green>Entered <color=yellow>Build Mode</color>. Press <color=white>B</color> to cancel, <color=white>V</color> to enter the Constructor.</color>");
                                        #else
                    env.ShowMessage("<color=green>Entered <color=yellow>Build Mode</color>. Press <color=white>B</color> to cancel.</color>");
                                        #endif
                }
                else
                {
                    env.ShowMessage("<color=green>Back to <color=yellow>Normal Mode</color>.</color>");
                }
            }
        }
        void UpdateWithCharacterController()
        {
            CheckFootfalls();

            RotateView();

            if (orbitMode)
            {
                isFlying = true;
            }

            // the jump state needs to read here to make sure it is not missed
            if (!m_Jump && !isFlying)
            {
                m_Jump = input.GetButtonDown(InputButtonNames.Jump);
            }

            if (!m_PreviouslyGrounded && m_CharacterController.isGrounded)
            {
                StartCoroutine(m_JumpBob.DoBobCycle());
                PlayLandingSound();
                m_MoveDir.y = 0f;
                m_Jumping   = false;
            }
            if (!m_CharacterController.isGrounded && !m_Jumping && m_PreviouslyGrounded)
            {
                m_MoveDir.y = 0f;
            }

            m_PreviouslyGrounded = m_CharacterController.isGrounded;

            // Process click events
            if (input.focused && input.enabled)
            {
                bool leftAltPressed     = input.GetButton(InputButtonNames.LeftAlt);
                bool leftShiftPressed   = input.GetButton(InputButtonNames.LeftShift);
                bool leftControlPressed = input.GetButton(InputButtonNames.LeftControl);
                bool fire1Pressed       = input.GetButton(InputButtonNames.Button1);

                if (fire1Pressed)
                {
                    if (ModelPreviewCancel())
                    {
                        fire1Pressed         = false;
                        lastHitButtonPressed = Time.time + 0.5f;
                    }
                }

                bool fire2Clicked = input.GetButtonDown(InputButtonNames.Button2);
                if (!leftShiftPressed && !leftAltPressed && !leftControlPressed)
                {
                    if (Time.time - lastHitButtonPressed > player.hitDelay)
                    {
                        if (fire1Pressed)
                        {
                            DoHit(player.hitDamage);
                        }
                    }
                    if (fire2Clicked)
                    {
                        DoHit(0);
                    }
                }

                if (crosshairOnBlock && input.GetButtonDown(InputButtonNames.MiddleButton))
                {
                    player.SetSelectedItem(crosshairHitInfo.voxel.type);
                }

                if (input.GetButtonDown(InputButtonNames.Build))
                {
                    env.SetBuildMode(!env.buildMode);
                    if (env.buildMode)
                    {
                                                #if UNITY_EDITOR
                        env.ShowMessage("<color=green>Entered <color=yellow>Build Mode</color>. Press <color=white>B</color> to cancel, <color=white>V</color> to enter the Constructor.</color>");
                                                #else
                        env.ShowMessage("<color=green>Entered <color=yellow>Build Mode</color>. Press <color=white>B</color> to cancel.</color>");
                                                #endif
                    }
                    else
                    {
                        env.ShowMessage("<color=green>Back to <color=yellow>Normal Mode</color>.</color>");
                    }
                }

                if (fire2Clicked && !leftAltPressed && !leftShiftPressed)
                {
                    DoBuild(m_Camera.transform.position, m_Camera.transform.forward, voxelHighlightBuilder != null ? voxelHighlightBuilder.transform.position : Misc.vector3zero);
                }

                // Toggles Flight mode
                if (input.GetButtonDown(InputButtonNames.Fly))
                {
                    isFlying = !isFlying;
                    if (isFlying)
                    {
                        m_Jumping = false;
                        env.ShowMessage("<color=green>Flying <color=yellow>ON</color></color>");
                    }
                    else
                    {
                        env.ShowMessage("<color=green>Flying <color=yellow>OFF</color></color>");
                    }
                }

                if (isGrounded && !isCrouched && input.GetButtonDown(InputButtonNames.LeftControl))
                {
                    isCrouched = true;
                }
                else if (isGrounded && isCrouched && input.GetButtonUp(InputButtonNames.LeftControl))
                {
                    isCrouched = false;
                }
                else if (isGrounded && input.GetButtonDown(InputButtonNames.Crouch))
                {
                    isCrouched = !isCrouched;
                    if (isCrouched)
                    {
                        env.ShowMessage("<color=green>Crouching <color=yellow>ON</color></color>");
                    }
                    else
                    {
                        env.ShowMessage("<color=green>Crouching <color=yellow>OFF</color></color>");
                    }
                }
                else if (input.GetButtonDown(InputButtonNames.Light))
                {
                    ToggleCharacterLight();
                }
                else if (input.GetButtonDown(InputButtonNames.ThrowItem))
                {
                    ThrowCurrentItem(m_Camera.transform.position, m_Camera.transform.forward);
                }
            }

            // Check water
            CheckWaterStatus();

            // Check crouch status
            if (!isInWater)
            {
                if (isCrouched && crouch.localPosition.y == 0)
                {
                    crouch.transform.localPosition   = new Vector3(0, -1f, 0);
                    m_CharacterController.stepOffset = 0.4f;
                }
                else if (!isCrouched && crouch.localPosition.y != 0)
                {
                    crouch.transform.localPosition   = Misc.vector3zero;
                    m_CharacterController.stepOffset = 1f;
                }
            }

                        #if UNITY_EDITOR
            UpdateConstructor();
                        #endif
        }