Skip to content

Commit

Permalink
Merge pull request #508 from PaulL48/master
Browse files Browse the repository at this point in the history
Add serde derives to structures in the control module
  • Loading branch information
sebcrozet authored Sep 9, 2023
2 parents 7d2111d + be99686 commit 39a8395
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/control/character_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use parry::bounding_volume::BoundingVolume;
use parry::math::Translation;
use parry::query::{DefaultQueryDispatcher, PersistentQueryDispatcher};

#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
#[derive(Copy, Clone, Debug, PartialEq)]
/// A length measure used for various options of a character controller.
pub enum CharacterLength {
Expand Down Expand Up @@ -55,6 +56,7 @@ impl CharacterLength {
}

/// Configuration for the auto-stepping character controller feature.
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
#[derive(Copy, Clone, Debug, PartialEq)]
pub struct CharacterAutostep {
/// The maximum step height a character can automatically step over.
Expand Down Expand Up @@ -91,6 +93,7 @@ pub struct CharacterCollision {
}

/// A character controller for kinematic bodies.
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
#[derive(Copy, Clone, Debug)]
pub struct KinematicCharacterController {
/// The direction that goes "up". Used to determine where the floor is, and the floor’s angle.
Expand Down

0 comments on commit 39a8395

Please sign in to comment.