center
The center of the obstacle, measured in the object's local space.
読み終わるまでの所要時間 1 分最終更新 24日前
Definition
- Type: Property
- Namespace: UnityEngine.AI
- Assembly: UnityEngine.AIModule
public Vector3 center { get; set; }
Remarks
Note: When a NavMeshObstacle is created the NavMeshObstacle.center is set to zero.
Examples
// Default center is (0, 0, 0)using UnityEngine;using UnityEngine.AI;public class ExampleScript : MonoBehaviour{ void Start() { NavMeshObstacle navMeshObstacle = gameObject.AddComponent<NavMeshObstacle>(); Debug.Log(navMeshObstacle.center); }}