INNER CODE UNIT · Rust
look_rotation
dust-engine/dust · crates/character/src/lib.rs:152
pub fn look_rotation(&self) -> Quat {
Quat::from_euler(EulerRot::YXZ, self.yaw, self.pitch, 0.0)
}
}
/// Marks the entity whose [`Transform`] follows the character `0`'s eyes and look angles.
#[derive(Component, Clone, Copy, Debug)]
pub struct CharacterCamera(pub Entity);
/// Triggered on the character entity when [`Character::view`] changes, so the app
/// can show or hide the character's visible body.
#[derive(EntityEvent, Clone, Copy, Debug)]
pub struct ViewChanged {
pub entity: Entity,
pub view: View,
}
/// Exclude the character and everything spawned under it (its visible body's