public override void StopTouching(GameObject previousTouchingObject) { base.StopTouching(previousTouchingObject); VRTK_ControllerActions action = previousTouchingObject.GetComponent <VRTK_ControllerActions> (); action.ToggleHighlightGrip(false); action.SetControllerOpacity(1f); }
//override the functions which are triggered when the controller start or stop touching this door object. public override void StartTouching(GameObject currentTouchingObject) { base.StartTouching(currentTouchingObject); if ((controller.position - transform.position).magnitude < 0.5) { VRTK_ControllerActions action = currentTouchingObject.GetComponent <VRTK_ControllerActions> (); action.ToggleHighlightGrip(true, Color.yellow); action.SetControllerOpacity(0.5f); } }
private void DoGripPressed(object sender, ControllerInteractionEventArgs e) { _tooltips.ShowTips(true, VRTK_ControllerTooltips.TooltipButtons.GripTooltip); actions.ToggleHighlightGrip(true, Color.yellow, 0.5f); actions.SetControllerOpacity(0.8f); }