// Update is called once per frame
    private void Update()
    {
        if (Input.GetMouseButtonDown(0) && Input.GetKey(KeyCode.LeftControl))
        {
            if (!(Camera.main is null))
            {
                _ray = Camera.main.ScreenPointToRay(Input.mousePosition);
            }

            if (Physics.Raycast(_ray, out _hit, 100.0f) && !_hit.transform.gameObject.name.Equals("Plane"))
            {
                if (_hit.transform)
                {
                    //If an object was already selected change it to it's original color
                    if (_go != null)
                    {
                        //Look after the child if the object is a hand
                        if (HandChecker.IsAnyHand(_go))
                        {
                            _mRendererChild.material.color = _originalColor;
                            _child = null;
                        }
                        //Change of the material if the object is a moveTarget
                        else if (MoveTargetChecker.IsMoveTarget(_go))
                        {
                            _mRenderer.material = _defaultMaterial;
                        }
                        _mRenderer.material.color = _originalColor;
                    }

                    //Get object and Hit Point
                    _hitPoint       = _hit.point;
                    _hitPointNormal = _hit.normal;
                    _go             = _hit.transform.gameObject;

                    //Mark the selected object as red
                    _mRenderer     = _go.GetComponent <MeshRenderer>();
                    _originalColor = _mRenderer.material.color;

                    _addObjectMenu.ObjectSelected(_go);

                    //Look after the child if the object is a hand
                    if (HandChecker.IsAnyHand(_go))
                    {
                        _child          = _go.transform.GetChild(0);
                        _mRendererChild = _child.GetComponent <MeshRenderer>();
                        _mRendererChild.material.color = _selectColor;
                    }
                    //Change of the material if the object is a moveTarget
                    else if (MoveTargetChecker.IsMoveTarget(_go))
                    {
                        _defaultMaterial    = _mRenderer.material;
                        _mRenderer.material = _materialTransparent;
                    }
                    //Standard procedure for normal GameObjects
                    else
                    {
                        _mRenderer.material.color = _selectColor;
                    }

                    _dragAndRotate = new DragAndRotate(_go, lockY);
                    if (HandChecker.IsHand(_go))
                    {
                        _handMovement = new HandMovement(_go);
                    }
                }
            }
            else
            {
                //If an object was already selected change it to it's original color and set the object to null
                if (_go != null)
                {
                    //Look after the child if the object is a hand
                    if (HandChecker.IsAnyHand(_go))
                    {
                        _mRendererChild.material.color = _originalColor;
                        _child          = null;
                        _mRendererChild = null;
                    }
                    //Change of the material if the object is a moveTarget
                    else if (MoveTargetChecker.IsMoveTarget(_go))
                    {
                        _mRenderer.material = _defaultMaterial;
                    }
                    _mRenderer.material.color = _originalColor;
                    _go        = null;
                    _mRenderer = null;
                    _addObjectMenu.ObjectSelected(_go);
                }
            }
        }
        try
        {
            if (HandChecker.IsHand(_go))
            {
                //Handle rotate OR Drag for a hand object
                if (Input.GetKey(KeyCode.M) || Input.GetKey(KeyCode.X))
                {
                    _moving = true;
                }
                else
                {
                    _moving = false;
                }

                if (!Input.GetKey(KeyCode.X))
                {
                    _handMovement.CastRayFromObject();
                }
                if (!Input.GetKey(KeyCode.M))
                {
                    _handMovement.HandleRotateHand();
                }
            }
            else
            {
                //handle Rotate OR Drag
                if (!Input.GetKey(KeyCode.M))
                {
                    _dragAndRotate.HandleRotate();
                }
                if (!Input.GetKey(KeyCode.X) && !Input.GetKey(KeyCode.Y) && !Input.GetKey(KeyCode.Z))
                {
                    _dragAndRotate.HandleDrag();
                }
            }
        }
        catch (Exception)
        {
            //Catch if no object is selected
        }
    }