27    float                       mLeanSpringConstant = 5000.0f;
 
   30    float                       mLeanSpringDamping = 1000.0f;
 
   33    float                       mLeanSpringIntegrationCoefficient = 0.0f;
 
   36    float                       mLeanSpringIntegrationCoefficientDecay = 4.0f;
 
   40    float                       mLeanSmoothingFactor = 0.8f;
 
   53    float                       GetWheelBase() 
const;
 
   88    virtual void                PreCollide(
float inDeltaTime, 
PhysicsSystem &inPhysicsSystem) 
override;
 
   89    virtual bool                SolveLongitudinalAndLateralConstraints(
float inDeltaTime) 
override;
 
   90    virtual void                SaveState(
StateRecorder &inStream) 
const override;
 
   92#ifdef JPH_DEBUG_RENDERER 
   97    bool                        mEnableLeanController = 
true;
 
   98    bool                        mEnableLeanSteeringLimit = 
true;
 
  110    float                       mLeanSpringIntegratedDeltaAngle = 0.0f;
 
  113    float                       mAppliedImpulse = 0.0f;
 
#define JPH_EXPORT
Definition: Core.h:236
 
#define JPH_NAMESPACE_END
Definition: Core.h:378
 
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:372
 
JPH_INLINE constexpr float DegreesToRadians(float inV)
Convert a value from degrees to radians.
Definition: Math.h:13
 
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition: Memory.h:31
 
#define JPH_DECLARE_SERIALIZABLE_VIRTUAL(linkage, class_name)
Definition: SerializableObject.h:109
 
Definition: DebugRenderer.h:47
 
Runtime controller class.
Definition: MotorcycleController.h:45
 
float mLeanSpringIntegrationCoefficient
Definition: MotorcycleController.h:102
 
void SetLeanSmoothingFactor(float inFactor)
Definition: MotorcycleController.h:83
 
bool IsLeanControllerEnabled() const
Check if the lean spring is enabled.
Definition: MotorcycleController.h:59
 
float GetLeanSpringIntegrationCoefficientDecay() const
Definition: MotorcycleController.h:79
 
float mMaxLeanAngle
Definition: MotorcycleController.h:99
 
float mLeanSpringConstant
Definition: MotorcycleController.h:100
 
void EnableLeanSteeringLimit(bool inEnable)
Enable or disable the lean steering limit. When enabled (default) the steering angle is limited based...
Definition: MotorcycleController.h:62
 
float mLeanSmoothingFactor
Definition: MotorcycleController.h:104
 
float mLeanSpringIntegrationCoefficientDecay
Definition: MotorcycleController.h:103
 
float GetLeanSpringConstant() const
Definition: MotorcycleController.h:67
 
float mLeanSpringDamping
Definition: MotorcycleController.h:101
 
float GetLeanSmoothingFactor() const
Definition: MotorcycleController.h:84
 
void SetLeanSpringConstant(float inConstant)
Spring constant for the lean spring.
Definition: MotorcycleController.h:66
 
void SetLeanSpringDamping(float inDamping)
Spring damping constant for the lean spring.
Definition: MotorcycleController.h:70
 
bool IsLeanSteeringLimitEnabled() const
Definition: MotorcycleController.h:63
 
void EnableLeanController(bool inEnable)
Enable or disable the lean spring. This allows you to temporarily disable the lean spring to allow th...
Definition: MotorcycleController.h:56
 
float GetLeanSpringIntegrationCoefficient() const
Definition: MotorcycleController.h:75
 
void SetLeanSpringIntegrationCoefficientDecay(float inDecay)
How much to decay the angle integral when the wheels are not touching the floor: new_value = e^(-deca...
Definition: MotorcycleController.h:78
 
float GetLeanSpringDamping() const
Definition: MotorcycleController.h:71
 
void SetLeanSpringIntegrationCoefficient(float inCoefficient)
The lean spring applies an additional force equal to this coefficient * Integral(delta angle,...
Definition: MotorcycleController.h:74
 
Definition: MotorcycleController.h:14
 
Definition: PhysicsSystem.h:29
 
Definition: StateRecorder.h:48
 
Simple binary input stream.
Definition: StreamIn.h:13
 
Simple binary output stream.
Definition: StreamOut.h:13
 
static JPH_INLINE Vec3 sZero()
Vector with all zeros.
Definition: Vec3.inl:107
 
Definition: VehicleConstraint.h:66
 
Runtime data for interface that controls acceleration / deceleration of the vehicle.
Definition: VehicleController.h:41
 
Runtime controller class.
Definition: WheeledVehicleController.h:90
 
Definition: WheeledVehicleController.h:73
 
virtual void RestoreBinaryState(StreamIn &inStream) override
Restore the contents of the controller settings in binary form from inStream.
Definition: WheeledVehicleController.cpp:157
 
virtual VehicleController * ConstructController(VehicleConstraint &inConstraint) const override
Create an instance of the vehicle controller class.
Definition: WheeledVehicleController.cpp:138
 
virtual void SaveBinaryState(StreamOut &inStream) const override
Saves the contents of the controller settings in binary form to inStream.
Definition: WheeledVehicleController.cpp:143