Esempio n. 1
0
 public override void OnDown(Vector3 hitPoint)
 {
     inputActions.SetListener(inputListener);
     grabbable = cameraMovement.GetGrabbable();
     iTween.MoveTo(grabbable.gameObject, iTween.Hash("position", contactPosition.position, "easeType", "linear", "time", .5, "oncomplete", "onTweenComplete", "oncompletetarget", gameObject));
     iTween.RotateTo(grabbable.gameObject, iTween.Hash("rotation", contactPosition.eulerAngles, "easeType", "linear", "time", .3));
 }
Esempio n. 2
0
 public void SetGrabbing(AbstractGrabbable grabbable)
 {
     if (grabbing != null && grabbable != null)
     {
         throw new UnityException($"Trying to grab {grabbable.gameObject.name} while grabbing {grabbing.gameObject.name}");
     }
     this.grabbing = grabbable;
     inputActionsManager.RefreshInputHints();
 }