pub struct KinematicCharacterController {
pub desired_translation: Vec3,
pub offset: f32,
pub max_slope_climb_angle: f32,
pub min_slope_slide_angle: f32,
pub autostep_height: f32,
pub autostep_min_width: f32,
pub autostep_enabled: bool,
pub is_grounded: bool,
}Expand description
Component for kinematic character movement. It provides high-level movement resolution (slopes, steps, etc.) that is more suitable for player characters than raw rigid-body physics.
Fields§
§desired_translation: Vec3The translation to apply in the current frame.
offset: f32The offset from obstacles to maintain.
max_slope_climb_angle: f32Maximum angle for climbing slopes (in radians).
min_slope_slide_angle: f32Minimum angle for sliding down a slope (in radians).
autostep_height: f32Maximum height for autostepping.
autostep_min_width: f32Minimum width for autostepping obstacles.
autostep_enabled: boolWhether autostepping is enabled.
is_grounded: boolWhether the character is currently grounded.
Trait Implementations§
Source§impl Clone for KinematicCharacterController
impl Clone for KinematicCharacterController
Source§fn clone(&self) -> KinematicCharacterController
fn clone(&self) -> KinematicCharacterController
Returns a duplicate 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 moreSource§impl Debug for KinematicCharacterController
impl Debug for KinematicCharacterController
Source§impl<'de> Deserialize<'de> for KinematicCharacterController
impl<'de> Deserialize<'de> for KinematicCharacterController
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Component for KinematicCharacterController
Auto Trait Implementations§
impl Freeze for KinematicCharacterController
impl RefUnwindSafe for KinematicCharacterController
impl Send for KinematicCharacterController
impl Sync for KinematicCharacterController
impl Unpin for KinematicCharacterController
impl UnwindSafe for KinematicCharacterController
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C1> ComponentBundle for C1where
C1: Component,
impl<C1> ComponentBundle for C1where
C1: Component,
Source§fn type_ids() -> Vec<TypeId>
fn type_ids() -> Vec<TypeId>
Returns the sorted list of
TypeIds for the components in this bundle. Read moreSource§fn create_columns() -> HashMap<TypeId, Box<dyn AnyVec>>
fn create_columns() -> HashMap<TypeId, Box<dyn AnyVec>>
Creates the set of empty, type-erased
Vec<T> columns required to store
this bundle’s components. Read moreSource§fn update_metadata(
metadata: &mut EntityMetadata,
location: PageIndex,
registry: &ComponentRegistry,
)
fn update_metadata( metadata: &mut EntityMetadata, location: PageIndex, registry: &ComponentRegistry, )
Updates the appropriate fields in an
EntityMetadata struct to point
to the location of this bundle’s data. Read moreSource§unsafe fn add_to_page(self, page: &mut ComponentPage)
unsafe fn add_to_page(self, page: &mut ComponentPage)
Adds the components from this bundle into the specified
ComponentPage. Read more