using UnityEngine; using System.Collections.Generic; namespace Pathfinding.RVO { using Pathfinding.Drawing; /// /// Base class for simple RVO colliders. /// /// This is a helper base class for RVO colliders. It provides automatic gizmos /// and helps with the winding order of the vertices as well as automatically updating the obstacle when moved. /// /// Extend this class to create custom RVO obstacles. /// /// See: RVOSquareObstacle /// /// Deprecated: This component is deprecated. Local avoidance colliders never worked particularly well and the performance was poor. Modify the graphs instead so that pathfinding takes obstacles into account. /// public abstract class RVOObstacle : VersionedMonoBehaviour { /// /// Mode of the obstacle. /// Determines winding order of the vertices /// public ObstacleVertexWinding obstacleMode; public RVOLayer layer = RVOLayer.DefaultObstacle; /// /// RVO Obstacle Modes. /// Determines winding order of obstacle vertices /// public enum ObstacleVertexWinding { /// Keeps agents from entering the obstacle KeepOut, /// Keeps agents inside the obstacle KeepIn, } /// /// Enable executing in editor to draw gizmos. /// If enabled, the CreateObstacles function will be executed in the editor as well /// in order to draw gizmos. /// protected abstract bool ExecuteInEditor { get; } /// If enabled, all coordinates are handled as local. protected abstract bool LocalCoordinates { get; } /// /// Static or dynamic. /// This determines if the obstacle can be updated by e.g moving the transform /// around in the scene. /// protected abstract bool StaticObstacle { get; } protected abstract float Height { get; } } }