Search Results for

    Show / Hide Table of Contents

    Struct LimitConeRange

    Represents a joint limit that constraints movement to within an elliptical cone.

    Assembly: FlaxEngine.dll
    File: Engine/Physics/Joints/Limits.h
    Syntax
    public struct LimitConeRange

    Constructors

    LimitConeRange()

    Constructs a limit with a 45 degree cone.

    Declaration
    public LimitConeRange()

    LimitConeRange(const float yLimitAngle, const float zLimitAngle, const float contactDist=-1.0f)

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

    Declaration
    public LimitConeRange(const float yLimitAngle, const float zLimitAngle, const float contactDist=-1.0f)
    Parameters
    float yLimitAngle

    The Y angle of the cone (in degrees). Movement is constrained between 0 and this angle on the Y axis.

    float zLimitAngle

    The Z angle of the cone (in degrees). Movement is constrained between 0 and this angle on the Z axis.

    float 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.

    LimitConeRange(const float yLimitAngle, const float zLimitAngle, const SpringParameters& spring, const float restitution = 0.0f)

    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 LimitConeRange(const float yLimitAngle, const float zLimitAngle, const SpringParameters& spring, const float restitution = 0.0f)
    Parameters
    float yLimitAngle

    The Y angle of the cone (in degrees). Movement is constrained between 0 and this angle on the Y axis.

    float zLimitAngle

    The Z angle of the cone (in degrees). Movement is constrained between 0 and this angle on the Z axis.

    SpringParameters spring

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

    float 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.

    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 = -1.0f
    Field Value
    float

    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
    public float Restitution = 0.0f
    Field Value
    float

    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

    YLimitAngle

    The Y angle of the cone (in degrees). Movement is constrained between 0 and this angle on the Y axis.

    Declaration
    public float YLimitAngle = 90.0f
    Field Value
    float

    ZLimitAngle

    The Z angle of the cone (in degrees). Movement is constrained between 0 and this angle on the Z axis.

    Declaration
    public float ZLimitAngle = 90.0f
    Field Value
    float

    Methods

    operator==(const LimitConeRange& other)

    Declaration
    public bool operator==(const LimitConeRange& other) const
    Parameters
    LimitConeRange other

    Returns
    bool

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat