@@ -8,6 +8,8 @@ use crate::prelude::QueryPipelineMut;
88use crate :: utils:: { SimdCross , SimdDot } ;
99
1010/// A character controller to simulate vehicles using ray-casting for the wheels.
11+ #[ cfg_attr( feature = "serde-serialize" , derive( Serialize , Deserialize ) ) ]
12+ #[ derive( Clone , Debug ) ]
1113pub struct DynamicRayCastVehicleController {
1214 wheels : Vec < Wheel > ,
1315 forward_ws : Vec < Vector < Real > > ,
@@ -23,6 +25,7 @@ pub struct DynamicRayCastVehicleController {
2325 pub index_forward_axis : usize ,
2426}
2527
28+ #[ cfg_attr( feature = "serde-serialize" , derive( Serialize , Deserialize ) ) ]
2629#[ derive( Copy , Clone , Debug , PartialEq ) ]
2730/// Parameters affecting the physical behavior of a wheel.
2831pub struct WheelTuning {
@@ -101,6 +104,7 @@ struct WheelDesc {
101104 pub side_friction_stiffness : Real ,
102105}
103106
107+ #[ cfg_attr( feature = "serde-serialize" , derive( Serialize , Deserialize ) ) ]
104108#[ derive( Copy , Clone , Debug , PartialEq ) ]
105109/// A wheel attached to a vehicle.
106110pub struct Wheel {
@@ -225,6 +229,7 @@ impl Wheel {
225229
226230/// Information about suspension and the ground obtained from the ray-casting
227231/// to simulate a wheel’s suspension.
232+ #[ cfg_attr( feature = "serde-serialize" , derive( Serialize , Deserialize ) ) ]
228233#[ derive( Copy , Clone , Debug , PartialEq , Default ) ]
229234pub struct RayCastInfo {
230235 /// The (world-space) contact normal between the wheel and the floor.
0 commit comments