Skip to main content

pite_physics/
character.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
5pub struct CharacterMoveResult {
6    pub movement: (f32, f32),
7    pub velocity: (f32, f32),
8    pub is_on_floor: bool,
9    pub is_on_wall: bool,
10    pub is_on_ceiling: bool,
11}
12
13impl Default for CharacterMoveResult {
14    fn default() -> Self {
15        Self {
16            movement: (0.0, 0.0),
17            velocity: (0.0, 0.0),
18            is_on_floor: false,
19            is_on_wall: false,
20            is_on_ceiling: false,
21        }
22    }
23}