Crate bevy_mod_raycast
source ·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
Global plugin state used to enable or disable all ray casting for a given type T.
Holds the topmost intersection for the raycasting set
T
.A 3D ray, with an origin and direction. The direction is guaranteed to be normalized.
Marks an entity as pickable, with type T.
The
RaycastSource
component is used to generate rays with the specified cast_method
. A ray
is generated when the RaycastSource is initialized, either by waiting for update_raycast system
to process the ray, or by using a with_ray
function.Enums
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
Updates the 3d cursor to be in the pointed world coordinates
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.