Exemplo n.º 1
0
 private void FixedUpdate()
 {
     if (!_bookImage.IsGrabbed())
     {
         _bookImage.transform.position = _bookImageTransform.position;
         _bookImage.transform.rotation = _bookImageTransform.rotation;
     }
 }
Exemplo n.º 2
0
    protected override void Update()
    {
        base.Update();

        bool canInteract = Mathf.Abs(_joint.angle) >= 90f;

        if (!canInteract && _image.enabled)
        {
            if (_image.IsGrabbed())
            {
                _image.ForceStopInteracting();
            }
        }

        _image.enabled = canInteract;
    }