/// Retrieves the velocity of an entity.
Retrieves the velocity of an entity.
Retrieves the velocity of an entity .
pub fn entity_vel(world: &World, entity: Entity) -> Option<DVec3> {
    if let Some(comp) = world.read_component::<VelocityComponent>().get(entity) {
        Some(comp.0)
    } else {
        None
    }
}
pub fn entity_vel ( world : & World , entity : Entity ) -> Option < DVec3 > { if let Some ( comp ) = world . read_component :: < VelocityComponent > ( ) . get ( entity ) { Some ( comp . 0 ) } else { None } }
Retrieves the velocity of an entity.
Retrieves the velocity of an entity .
world
&World
entity
Entity