예제 #1
0
        private void Update()
        {
            if (_currentObject == null)
            {
                return;
            }

            _currentObject.transform.localPosition = _currentObject.GetHandPosition();
        }
예제 #2
0
        private void Take(C_Object obj)
        {
            _character.Animator.SetTrigger("Grab");

            _object = obj;
            _object.Take(this.gameObject);
            _object.transform.SetParent(_hand);
            _object.transform.localPosition = _object.GetHandPosition();
            //_object.transform.localPosition = Vector3.zero;
            _object.transform.localRotation = Quaternion.identity;
            //_object.transform.localPosition = new Vector3(
            //    _object.OffsetHand.localPosition.x * _object.transform.localScale.x,
            //    _object.OffsetHand.localPosition.y * _object.transform.localScale.y,
            //    _object.OffsetHand.localPosition.z * _object.transform.localScale.z);

            DisableHand();
        }