/// <summary>
        /// Configures the <see cref="OffsetDistanceComparator"/> when an interactable is added.
        /// </summary>
        /// <param name="interactable">The added interactable.</param>
        protected virtual void OnInteractableAdded(GameObject interactable)
        {
            OffsetDistanceComparator.Source  = interactable;
            OffsetDistanceComparator.Target  = interactable;
            OffsetDistanceComparator.enabled = interactable != null;
            OffsetDistanceComparator.SavePosition();

            if (interactable != null)
            {
                Facade.BodyRepresentationFacade.Interest = BodyRepresentationProcessor.MovementInterest.CharacterController;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Configures the <see cref="OffsetDistanceComparator"/> when an interactable is added.
        /// </summary>
        /// <param name="interactable">The added interactable.</param>
        protected virtual void OnInteractableAdded(GameObject interactable)
        {
            OffsetDistanceComparator.Source  = interactable;
            OffsetDistanceComparator.Target  = interactable;
            OffsetDistanceComparator.enabled = interactable != null;
            OffsetDistanceComparator.SavePosition();

            if (interactable != null)
            {
                Facade.Target.InteractableAdded();
            }
        }