Crate bevy_mod_raycast
source ·Re-exports
pub use debug::*;
Modules
- Encapsulates Ray3D, preventing use of struct literal syntax. This allows us to guarantee that the
Ray3d
direction is normalized, because it can only be instantiated with the constructor.
Structs
- A 3D ray, with an origin and direction. The direction is guaranteed to be normalized.
- Marks an entity as pickable, with type T.
- Global plugin state used to enable or disable all ray casting for a given type T.
- The
RaycastSource
component is used to generate rays with the specifiedcast_method
. Aray
is generated when the RaycastSource is initialized, either by waiting for update_raycast system to process the ray, or by using awith_ray
function.`
Enums
- Specifies the method used to generate rays.
Traits
Functions
- Cast a ray on a mesh, and returns the intersection
- Checks if a ray intersects a mesh, and returns the nearest intersection if one exists.
- Takes a ray and triangle and computes the intersection and normal
- Implementation of the Möller-Trumbore ray-triangle intersection test
- Iterates through all entities with the RaycastMesh component, checking for intersections. If these entities have bounding volumes, these will be checked first, greatly accelerating the process.