NavMeshAgent

Struct NavMeshAgent 

Source
pub struct NavMeshAgent {
Show 16 fields pub m_Acceleration: f32, pub m_AngularSpeed: f32, pub m_AutoRepath: bool, pub m_AutoTraverseOffMeshLink: bool, pub m_BaseOffset: f32, pub m_Enabled: u8, pub m_GameObject: PPtr, pub m_Height: f32, pub m_ObstacleAvoidanceType: i32, pub m_Radius: f32, pub m_Speed: f32, pub m_StoppingDistance: f32, pub m_WalkableMask: u32, pub avoidancePriority: Option<i32>, pub m_AgentTypeID: Option<i32>, pub m_AutoBraking: Option<bool>,
}
Expand description

NavMeshAgent is a class of the Unity engine since version 3.5.0. Exert from Unity’s scripting documentation: Navigation mesh agent. This component is attached to a mobile character in the game to allow it to navigate the Scene using the NavMesh. See the Navigation section of the manual for further details.

Fields§

§m_Acceleration: f32

The maximum acceleration of an agent as it follows a path, given in units / sec^2.

§m_AngularSpeed: f32

Maximum turning speed in (deg/s) while following a path.

§m_AutoRepath: bool

Should the agent attempt to acquire a new path if the existing path becomes invalid?

§m_AutoTraverseOffMeshLink: bool

Should the agent move across OffMeshLinks automatically?

§m_BaseOffset: f32

The relative vertical displacement of the owning GameObject.

§m_Enabled: u8

Enabled Behaviours are Updated, disabled Behaviours are not.

§m_GameObject: PPtr

The game object this component is attached to. A component is always attached to a game object. PPtr<GameObject>: (3.5.0 - 2022.3.2f1)

§m_Height: f32

The height of the agent for purposes of passing under obstacles, etc.

§m_ObstacleAvoidanceType: i32

The level of quality of avoidance.

§m_Radius: f32

The avoidance radius for the agent.

§m_Speed: f32

Maximum movement speed when following a path.

§m_StoppingDistance: f32

Stop within this distance from the target position.

§m_WalkableMask: u32§avoidancePriority: Option<i32>

The avoidance priority level. i32: (4.0.0 - 2022.3.2f1)

§m_AgentTypeID: Option<i32>

The type ID for the agent. i32: (5.6.0b1 - 2022.3.2f1)

§m_AutoBraking: Option<bool>

Should the agent brake automatically to avoid overshooting the destination point? bool: (4.1.0 - 2022.3.2f1)

Trait Implementations§

Source§

impl Debug for NavMeshAgent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for NavMeshAgent

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for NavMeshAgent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,