Table of Contents

Struct BodyActivity

Namespace
BepuPhysics
Assembly
BepuPhysics.dll

Describes how a body sleeps, and its current state with respect to sleeping.

public struct BodyActivity
Inherited Members

Fields

MinimumTimestepsUnderThreshold

The number of time steps that the body must be under the sleep threshold before the body becomes a sleeping candidate. Note that the body is not guaranteed to go to sleep immediately after meeting this minimum.

public byte MinimumTimestepsUnderThreshold

Field Value

byte

SleepCandidate

True if this body is a candidate for being slept. If all the bodies that it is connected to by constraints are also candidates, this body may go to sleep.

public bool SleepCandidate

Field Value

bool

SleepThreshold

Threshold of squared velocity under which the body is allowed to go to sleep. This is compared against dot(linearVelocity, linearVelocity) + dot(angularVelocity, angularVelocity). Setting this to a negative value guarantees the body cannot go to sleep without user action.

public float SleepThreshold

Field Value

float

TimestepsUnderThresholdCount

If the body is awake, this is the number of time steps that the body has had a velocity below the sleep threshold.

public byte TimestepsUnderThresholdCount

Field Value

byte