use crate::prelude::*;
use avian3d::math::{Scalar, TAU};
pub(super) fn plugin(_app: &mut App) {}
#[derive(Debug, Copy, Clone, Component)]
pub(crate) struct ShadowParams {
pub(crate) target_position: Vec3,
pub(crate) target_rotation: Quat,
pub(crate) max_angular: Scalar,
pub(crate) max_speed: Scalar,
}
impl Default for ShadowParams {
fn default() -> Self {
Self {
target_position: Vec3::ZERO,
target_rotation: Quat::IDENTITY,
max_angular: TAU * 2.0,
max_speed: 10.0,
}
}
}
#[derive(Debug, Copy, Clone, Component)]
pub(crate) struct HoldError {
pub(crate) error_time: f32,
pub(crate) error: f32,
}
impl HoldError {
pub(crate) fn reset(&mut self) {
*self = Self::default();
}
}
impl Default for HoldError {
fn default() -> Self {
Self {
error_time: -1.0,
error: 0.0,
}
}
}