diff options
| author | Sébastien Crozet <developer@crozet.re> | 2023-09-09 12:59:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-09 12:59:16 +0200 |
| commit | 39a839560e7cfd63ac66a76d55fae53c88b441b0 (patch) | |
| tree | d126991a1dbca1fb0b19238990739fbf06d88c72 | |
| parent | 7d2111d0b959cb0532eb9ad43a6354ae31970d17 (diff) | |
| parent | be9968628fd65369a90b11d9165b7b35770f20a8 (diff) | |
| download | rapier-39a839560e7cfd63ac66a76d55fae53c88b441b0.tar.gz rapier-39a839560e7cfd63ac66a76d55fae53c88b441b0.tar.bz2 rapier-39a839560e7cfd63ac66a76d55fae53c88b441b0.zip | |
Merge pull request #508 from PaulL48/master
Add serde derives to structures in the control module
| -rw-r--r-- | src/control/character_controller.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs index a5bcf3d..8f9ef26 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. |
