Class LimitConeRange
Represents a joint limit that constraints movement to within an elliptical cone.
Inheritance
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public sealed class LimitConeRange : ValueType
Constructors
LimitConeRange(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 LimitConeRange(float yLimitAngle, float zLimitAngle, SpringParameters spring, float restitution = 0F)
Parameters
System.Single
yLimitAngle
The Y angle of the cone (in degrees). Movement is constrained between 0 and this angle on the Y axis. |
System.Single
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. |
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. |
LimitConeRange(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 LimitConeRange(float yLimitAngle, float zLimitAngle, float contactDist = -1F)
Parameters
System.Single
yLimitAngle
The Y angle of the cone (in degrees). Movement is constrained between 0 and this angle on the Y axis. |
System.Single
zLimitAngle
The Z angle of the cone (in degrees). Movement is constrained between 0 and this angle on the Z axis. |
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
|
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
|
YLimitAngle
The Y angle of the cone (in degrees). Movement is constrained between 0 and this angle on the Y axis.
Declaration
[Limit(0F, 180F, 1F)]
public float YLimitAngle
Field Value
System.Single
|
ZLimitAngle
The Z angle of the cone (in degrees). Movement is constrained between 0 and this angle on the Z axis.
Declaration
[Limit(0F, 180F, 1F)]
public float ZLimitAngle
Field Value
System.Single
|
Properties
Default
The default LimitConeRange.
Declaration
public static LimitConeRange Default { get; }
Property Value
LimitConeRange
|