async public override void OnInteractionTrigger(InteractionModes mode) { if (CheckIfMinDistance()) { #if NESTLE_RV ReferenceManagerDependent.Instance.LongeFrame.SetActive(true); #endif Debug.Log("Too far to get object:" + Vector3.Distance(playerController.transform.position, this.transform.position)); return; } await new WaitForEndOfFrame(); handController.SetObjectOnHand(objectBeingPushed.gameObject, true); objectBeingPushed.enabled = true; objectBeingPushed.ActivateMover(this.gameObject, true); objectBeingPushed.OnExecuted += Finished; }
public void ActivatePushing(GameObject go) { objectAttracting.ActivateMover(go, false); objectAttracting.OnExecuted += Finished; objectAttracting.enabled = true; }