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 more