summaryrefslogtreecommitdiff
path: root/Other/AstarPathfindingDemo/Packages/com.arongranberg.astar/RVO/RVOSquareObstacle.cs
blob: f4bff758ffd7664daf6943851546866a4f03a21c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using UnityEngine;

namespace Pathfinding.RVO {
	/// <summary>
	/// Square Obstacle for RVO Simulation.
	///
	/// 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.
	/// </summary>
	[AddComponentMenu("")]
	[HelpURL("https://arongranberg.com/astar/documentation/stable/rvosquareobstacle.html")]
	public class RVOSquareObstacle : RVOObstacle {
		/// <summary>Height of the obstacle</summary>
		public float height = 1;

		/// <summary>Size of the square</summary>
		public Vector2 size = Vector3.one;

		/// <summary>Center of the square</summary>
		public Vector2 center = Vector3.zero;

		protected override bool StaticObstacle { get { return false; } }
		protected override bool ExecuteInEditor { get { return true; } }
		protected override bool LocalCoordinates { get { return true; } }
		protected override float Height { get { return height; } }
	}
}