[−][src]Struct oxygengine_navigation::component::NavAgent
Nav agent component.
Fields
position: NavVec3Current agent position in world space.
direction: NavVec3Current agent normalized direction.
speed: ScalarCurrent speed (units per second).
radius: ScalarAgent sphere radius (used in obstacle and agent avoidance).
min_target_distance: ScalarMnimal distance to target (affects direction, tells how far look for point to go to in an instant).
Methods
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]
fn clone(&self) -> NavAgent[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Default for NavAgent[src]
impl Debug for NavAgent[src]
impl Component for NavAgent[src]
type Storage = VecStorage<Self>
Associated storage type for this component.
Auto Trait Implementations
impl Sync for NavAgent
impl Send for NavAgent
impl Unpin for NavAgent
impl RefUnwindSafe for NavAgent
impl UnwindSafe for NavAgent
Blanket Implementations
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> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Resource for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> TryDefault for T where
T: Default,
T: Default,
fn try_default() -> Result<T, String>
fn unwrap_default() -> Self
Calls try_default and panics on an error case.
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> Erased for T
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>,