namespace VRTK.Prefabs.Helpers.TrackedCollider
{
using UnityEngine;
using Malimbe.PropertySerializationAttribute;
using Malimbe.XmlDocumentationAttribute;
using Malimbe.MemberClearanceMethod;
using Malimbe.MemberChangeMethod;
using Zinnia.Data.Attribute;
///
/// The public interface for the TrackedCollider prefab.
///
public class TrackedColliderFacade : MonoBehaviour
{
#region Tracking Settings
///
/// The source to track.
///
[Serialized, Cleared]
[field: Header("Tracking Settings"), DocumentedByXml]
public GameObject Source { get; set; }
#endregion
#region Reference Settings
///
/// The linked Internal Setup.
///
[Serialized]
[field: Header("Reference Settings"), DocumentedByXml, Restricted]
public TrackedColliderConfigurator Configuration { get; protected set; }
#endregion
///
/// Snaps the tracked collider directly to the source current position.
///
public virtual void SnapToSource()
{
Configuration.SnapToSource();
}
///
/// Called after has been changed.
///
[CalledAfterChangeOf(nameof(Source))]
protected virtual void OnAfterSourceChange()
{
Configuration.SetSource(Source);
}
}
}