Struct ark_api::world::SpatialQueryHit
source · [−]#[repr(C)]pub struct SpatialQueryHit {
pub entity: Entity,
pub point: Vec3,
pub distance: f32,
pub normal: Vec3,
}
Expand description
What we return from a query
Fields
entity: Entity
The entity we hit.
point: Vec3
Where in the world we hit it.
distance: f32
The distance along the ray.
The hits are sorted by this distance when returned from raycast and spherecast queries.
In a raycast this is equal to ray.origin.distance(hit.position)
,
but in a spherecast it can be different.
normal: Vec3
The contact normal at the hit point.
Trait Implementations
sourceimpl Clone for SpatialQueryHit
impl Clone for SpatialQueryHit
sourcefn clone(&self) -> SpatialQueryHit
fn clone(&self) -> SpatialQueryHit
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SpatialQueryHit
impl Debug for SpatialQueryHit
impl Copy for SpatialQueryHit
Auto Trait Implementations
impl RefUnwindSafe for SpatialQueryHit
impl Send for SpatialQueryHit
impl Sync for SpatialQueryHit
impl Unpin for SpatialQueryHit
impl UnwindSafe for SpatialQueryHit
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more