Struct MotorSettings
- Namespace
- BepuPhysics.Constraints
- Assembly
- BepuPhysics.dll
Defines some of the shared behavior across motor constraints.
public struct MotorSettings
- Inherited Members
Constructors
MotorSettings(float, float)
Defines settings for a motor constraint.
public MotorSettings(float maximumForce, float softness)
Parameters
maximumForce
floatMaximum amount of force the motor can apply in one unit of time.
softness
floatGets or sets how soft the constraint is. Values range from 0 to infinity. Softness is inverse damping; 0 is perfectly rigid, 1 is very soft, float.MaxValue is effectively nonexistent.
Fields
Damping
Mass-scaled damping constant. If you want to simulate a viscous damping coefficient of D with an object of mass M, set this damping value to D / M.
public float Damping
Field Value
MaximumForce
Maximum amount of force the motor can apply in one unit of time.
public float MaximumForce
Field Value
Properties
Softness
Gets or sets how soft the constraint is. Values range from 0 to infinity. Softness is inverse damping; 0 is perfectly rigid, 1 is very soft, float.MaxValue is effectively nonexistent.
public float Softness { get; set; }
Property Value
Methods
Validate(in MotorSettings)
Checks if a settings instance has valid nonnegative values.
public static bool Validate(in MotorSettings settings)
Parameters
settings
MotorSettingsInstance to examine.
Returns
- bool
True if the settings are valid, false otherwise.