Struct oxygengine_navigation::component::NavAgent [−][src]
pub struct NavAgent {
pub position: NavVec3,
pub direction: NavVec3,
pub speed: Scalar,
pub radius: Scalar,
pub min_target_distance: Scalar,
// some fields omitted
}Expand description
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).
Implementations
pub fn set_destination(
&mut self,
target: NavAgentTarget,
query: NavQuery,
mode: NavPathMode,
mesh: NavMeshID
)[src]
pub fn set_destination(
&mut self,
target: NavAgentTarget,
query: NavQuery,
mode: NavPathMode,
mesh: NavMeshID
)[src]Sets destination to go to.
Arguments
target- target to go to.query- query quality.mode- path finding quality.mesh- nav mesh to move on.
Trait Implementations
type Storage = VecStorage<Self>
type Storage = VecStorage<Self>Associated storage type for this component.
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]Deserialize this value from the given Serde deserializer. Read more
fn from_prefab_with_extras(
data: Value,
_named_entities: &HashMap<String, Entity, RandomState>,
_state_token: ID<()>
) -> Result<Self, PrefabError>[src]Auto Trait Implementations
impl RefUnwindSafe for NavAgentimpl UnwindSafe for NavAgentBlanket Implementations
impl<T> Any for T where
T: Any,
impl<T> Any for T where
T: Any, pub fn get_type_id(&self) -> TypeIdMutably borrows from an owned value. Read more
type Output = T
type Output = TShould always be Self
The inverse inclusion map: attempts to construct self from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> boolChecks if self is actually part of its subset T (and can be converted to it).
pub unsafe fn to_subset_unchecked(&self) -> SS
pub unsafe fn to_subset_unchecked(&self) -> SSUse with care! Same as self.to_subset but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SPThe inclusion map: converts self to the equivalent element of its superset.
impl<T> TryDefault for T where
T: Default,
impl<T> TryDefault for T where
T: Default, pub fn try_default() -> Result<T, String>
pub fn try_default() -> Result<T, String>Tries to create the default.
fn unwrap_default() -> Self
fn unwrap_default() -> SelfCalls try_default and panics on an error case.