From be9968628fd65369a90b11d9165b7b35770f20a8 Mon Sep 17 00:00:00 2001 From: Paul Lane Date: Tue, 1 Aug 2023 21:44:48 -0400 Subject: [PATCH] Add serde derives to structures in the control module --- src/control/character_controller.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs index a5bcf3d75..8f9ef2612 100644 --- a/src/control/character_controller.rs +++ b/src/control/character_controller.rs @@ -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 { @@ -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. @@ -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.