Search Results for

    Show / Hide Table of Contents

    Struct LimitLinearRange

    Represents a joint limit between two distance values. Lower value must be less than the upper value.

    Inherited Members
    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.ValueType.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public struct LimitLinearRange

    Constructors

    LimitLinearRange(Single, Single, SpringParameters, Single)

    Constructs a soft limit. Once the limit is reached the bodies will bounce back according to the restitution parameter and will be pulled back towards the limit by the provided spring.

    Declaration
    public LimitLinearRange(float lower, float upper, SpringParameters spring, float restitution = 0F)
    Parameters
    System.Single lower

    The lower distance of the limit. Must be less than upper.

    System.Single upper

    The upper distance of the limit. Must be more than lower.

    SpringParameters spring

    The spring that controls how are the bodies pulled back towards the limit when they breach it.

    System.Single restitution

    Controls how do objects react when the limit is reached, values closer to zero specify non-elastic collision, while those closer to one specify more elastic (i.e bouncy) collision. Must be in [0, 1] range.

    LimitLinearRange(Single, Single, Single)

    Constructs a hard limit. Once the limit is reached the movement of the attached bodies will come to a stop.

    Declaration
    public LimitLinearRange(float lower, float upper, float contactDist = -1F)
    Parameters
    System.Single lower

    The lower distance of the limit. Must be less than upper.

    System.Single upper

    The upper distance of the limit. Must be more than lower.

    System.Single contactDist

    Distance from the limit at which it becomes active. Allows the solver to activate earlier than the limit is reached to avoid breaking the limit. Specify -1 for the default.

    Fields

    ContactDist

    Distance from the limit at which it becomes active. Allows the solver to activate earlier than the limit is reached to avoid breaking the limit.

    Declaration
    public float ContactDist
    Field Value
    System.Single

    Default

    The default LimitLinearRange structure with empty limit.

    Declaration
    public static readonly LimitLinearRange Default
    Field Value
    LimitLinearRange

    Lower

    The lower distance of the limit. Must be less than upper.

    Declaration
    public float Lower
    Field Value
    System.Single

    Restitution

    Controls how do objects react when the limit is reached, values closer to zero specify non-elastic collision, while those closer to one specify more elastic (i.e bouncy) collision. Must be in [0, 1] range.

    Declaration
    [Limit(0F, 1F, 1F)]
    public float Restitution
    Field Value
    System.Single

    Spring

    The spring that controls how are the bodies pulled back towards the limit when they breach it.

    Declaration
    public SpringParameters Spring
    Field Value
    SpringParameters

    Upper

    The upper distance of the limit. Must be more than lower.

    Declaration
    public float Upper
    Field Value
    System.Single

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2021 Wojciech Figat