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: EntityThe entity we hit.
point: Vec3Where in the world we hit it.
distance: f32The 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: Vec3The contact normal at the hit point.
Trait Implementations§
source§impl Clone for SpatialQueryHit
impl Clone for SpatialQueryHit
source§fn clone(&self) -> SpatialQueryHit
fn clone(&self) -> SpatialQueryHit
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl 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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more