Skip to main content

ShakeDetectorFactory

A class in Root.Township, the global namespace.

Serializable set of shake settings that builds a ShakeDetectorHelper for a given rigidbody. Used by FireBug.

Constructors​

MemberWhat it is
ShakeDetectorFactory()Creates a ShakeDetectorFactory with default values.

Fields​

4 private and internal fields
MemberWhat it is
private float fadePerSecondHow fast built-up shake strength fades away.
private float jumpPerChangeStrength added for a full reversal of direction.
private float thresholdStrength needed to count as a shake. At 0 or below the helper never fires.
private float velocityThresholdSquaredSquared speed the rigidbody must reach before a direction change counts.

Methods​

MemberWhat it is
ShakeDetectorHelper GetHelper(Rigidbody targetRigidbody)Makes a new ShakeDetectorHelper with these settings for the rigidbody.

Used in​

Members of other types that take, return or hold a ShakeDetectorFactory: