INNER CODE UNIT · Rust
velocity
dust-engine/dust · crates/character/src/lib.rs:231
let velocity = direction.normalize_or_zero() * character.fly_speed * sprint_multiplier;
transform.translation = start + velocity * dt;
character.velocity = velocity;
character.grounded = false;
character.jump_requested = false;
linear_velocity.0 = velocity;
continue;
}
let wish = yaw * input * character.walk_speed * sprint_multiplier;
let rotation = transform.rotation;
let filter = self_filter(entity, &children);
let config = MoveAndSlideConfig::default();
let skin_width = move_and_slide.length_unit.0 * config.skin_width;
// Ground probe: a short downward sweep (`ground_probe` plus the skin
// width), so any hit is within reach. `MoveHitData` distances are not
// used: `cast_move` reports the cast's maximum length as