[−][src]Struct oxygengine_navigation::component::NavAgent
Nav agent component.
Fields
position: NavVec3
Current agent position in world space.
direction: NavVec3
Current agent normalized direction.
speed: Scalar
Current speed (units per second).
radius: Scalar
Agent sphere radius (used in obstacle and agent avoidance).
min_target_distance: Scalar
Mnimal distance to target (affects direction, tells how far look for point to go to in an instant).
Implementations
impl NavAgent
[src]
pub fn new(position: NavVec3) -> Self
[src]
pub fn new_with_direction(position: NavVec3, direction: NavVec3) -> Self
[src]
pub fn id(&self) -> NavAgentID
[src]
pub fn target(&self) -> Option<NavAgentTarget>
[src]
pub fn destination(&self) -> Option<&NavAgentDestination>
[src]
pub fn set_destination(
&mut self,
target: NavAgentTarget,
query: NavQuery,
mode: NavPathMode,
mesh: NavMeshID
)
[src]
&mut self,
target: NavAgentTarget,
query: NavQuery,
mode: NavPathMode,
mesh: NavMeshID
)
Sets destination to go to.
Arguments
target
- target to go to.query
- query quality.mode
- path finding quality.mesh
- nav mesh to move on.
pub fn clear_path(&mut self)
[src]
pub fn recalculate_path(&mut self)
[src]
pub fn path(&self) -> Option<&[NavVec3]>
[src]
pub fn set_path(&mut self, path: Vec<NavVec3>)
[src]
Trait Implementations
impl Clone for NavAgent
[src]
impl Component for NavAgent
[src]
type Storage = VecStorage<Self>
Associated storage type for this component.
impl Debug for NavAgent
[src]
impl Default for NavAgent
[src]
impl<'de> Deserialize<'de> for NavAgent
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Prefab for NavAgent
[src]
fn from_prefab(data: Value) -> Result<Self, PrefabError>
[src]
fn from_prefab_with_extras(
data: Value,
_named_entities: &HashMap<String, Entity, RandomState>,
_state_token: ID<()>
) -> Result<Self, PrefabError>
[src]
data: Value,
_named_entities: &HashMap<String, Entity, RandomState>,
_state_token: ID<()>
) -> Result<Self, PrefabError>
fn to_prefab(&self) -> Result<Value, PrefabError>
[src]
fn from_prefab_str(data: &str) -> Result<Self, PrefabError>
[src]
fn to_prefab_string(&self) -> Result<String, PrefabError>
[src]
fn post_from_prefab(&mut self)
[src]
impl PrefabComponent for NavAgent
[src]
impl Serialize for NavAgent
[src]
Auto Trait Implementations
impl RefUnwindSafe for NavAgent
impl Send for NavAgent
impl Sync for NavAgent
impl Unpin for NavAgent
impl UnwindSafe for NavAgent
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, C> ComponentContainerModify<'a, ComponentContainer<'a, C>> for C where
C: Component,
[src]
C: Component,
fn fetch(world: &'a World, entity: Entity) -> ComponentContainer<'a, C>
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: Any,
T: Any,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> TryDefault for T where
T: Default,
T: Default,
fn try_default() -> Result<T, String>
fn unwrap_default() -> Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,