INNER CODE UNIT · C#
Body2DComponent
stride3d/stride-community-toolkit · src/Stride.CommunityToolkit.Bepu/Body2DComponent.cs:47
public class Body2DComponent : BodyComponent, ISimulationUpdate
{
/// <summary>
/// Ceiling on the plane-restoring speed, in world units per second.
/// </summary>
/// <remarks>
/// This mainly guards extreme cases (for example, a body spawned far from the plane) by preventing
/// an overly aggressive snap-back velocity.
/// </remarks>
private const float MaximumCorrectionSpeed = 1f;
/// <summary>Default drift allowance, one millimetre for a scene built at one unit per metre.</summary>
private const float DefaultZTolerance = 0.001f;
// What the out-of-plane inverse-inertia terms are scaled by, rather than being set to zero.
//
// Zeroing them is the obvious way to say "infinitely resistant to rotation about this axis", but
// zeroing *some* terms and not others is a degenerate case the solver handles badly. In a dense