pub struct Velocity { /* private fields */ }
Expand description
Velocity component.
Use to move and rotate entities (without physics).
Implementations
sourceimpl Velocity
impl Velocity
sourcepub fn velocity(&self) -> ValueAccessorReadWriteAnimate<Vec3>
pub fn velocity(&self) -> ValueAccessorReadWriteAnimate<Vec3>
Returns a ValueAccessor
for the world-space linear velocity of the entity.
Used to set/get/animate the velocity. This only works if physics has not been enabled for the entity.
sourcepub fn angular_velocity(&self) -> ValueAccessorReadWriteAnimate<Vec3>
pub fn angular_velocity(&self) -> ValueAccessorReadWriteAnimate<Vec3>
Returns a ValueAccessor
for the world-space angular velocity of the entity
This is an angular velocity as a pseudovector, with its magnitude measuring the rate at which an object rotates or revolves (in radians per seconds), and its direction pointing perpendicular to the instantaneous plane of rotation or angular displacement.
Used to set/get/animate the velocity. This only works if physics has not been enabled for the entity.
Trait Implementations
sourceimpl ComponentTrait for Velocity
impl ComponentTrait for Velocity
sourcefn get_type() -> ComponentType
fn get_type() -> ComponentType
The type of the component, as a ComponentType
enum.
sourcefn from_entity(handle: Entity) -> Self
fn from_entity(handle: Entity) -> Self
Adopt an Entity
, wrap in a component struct.
Auto Trait Implementations
impl RefUnwindSafe for Velocity
impl Send for Velocity
impl Sync for Velocity
impl Unpin for Velocity
impl UnwindSafe for Velocity
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more