Enum bevy_mod_raycast::RayCastMethod
source · [−]pub enum RayCastMethod {
Screenspace(Vec2),
Transform,
}
Expand description
Specifies the method used to generate rays.
Variants
Screenspace(Vec2)
Specify screen coordinates relative to the camera component associated with this entity.
Component Requirements
This requires a [Windows] resource to convert the cursor coordinates to NDC, and a [Camera] component associated with this RayCastSource’s entity, to determine where the screenspace ray is firing from in the world.
Transform
Use a transform in world space to define a pick ray. This transform is applied to a vector at the origin pointing up to generate a ray.
Component Requirements
Requires a [GlobalTransform] component associated with this RayCastSource’s entity.
Auto Trait Implementations
impl RefUnwindSafe for RayCastMethod
impl Send for RayCastMethod
impl Sync for RayCastMethod
impl Unpin for RayCastMethod
impl UnwindSafe for RayCastMethod
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more