Crate bevy_mod_raycast[][src]

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 computed intersection information

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

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.

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.