- Direct Known Subclasses:
PxJointAngularLimitPair,PxJointLimitCone,PxJointLimitPyramid,PxJointLinearLimit,PxJointLinearLimitPair
Limits are enabled or disabled by setting flags or other configuration parameters joints, see the documentation for specific joint types for details.
-
Nested Class Summary
Nested classes/interfaces inherited from class physx.NativeObject
NativeObject.Allocator<T> -
Field Summary
FieldsFields inherited from class physx.NativeObject
address, isExternallyAllocated, SIZEOF_BYTE, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_POINTER, SIZEOF_SHORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PxJointLimitParametersarrayGet(long baseAddress, int index) floatdetermines the minimum impact velocity which will cause the joint to bouncefloatif spring is greater than zero, this is the damping of the limit springfloatControls the amount of bounce when the joint hits a limit.floatif greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limitbooleanisSoft()booleanisValid()Returns true if the current settings are valid.voidsetBounceThreshold(float value) determines the minimum impact velocity which will cause the joint to bouncevoidsetDamping(float value) if spring is greater than zero, this is the damping of the limit springvoidsetRestitution(float value) Controls the amount of bounce when the joint hits a limit.voidsetStiffness(float value) if greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limitstatic PxJointLimitParameterswrapPointer(long address) Methods inherited from class physx.NativeObject
checkNotNull, equals, getAddress, hashCode
-
Field Details
-
SIZEOF
public static final int SIZEOF -
ALIGNOF
public static final int ALIGNOF- See Also:
-
-
Constructor Details
-
PxJointLimitParameters
protected PxJointLimitParameters() -
PxJointLimitParameters
protected PxJointLimitParameters(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
getRestitution
public float getRestitution()Controls the amount of bounce when the joint hits a limit.A restitution value of 1.0 causes the joint to bounce back with the velocity which it hit the limit. A value of zero causes the joint to stop dead.
In situations where the joint has many locked DOFs (e.g. 5) the restitution may not be applied correctly. This is due to a limitation in the solver which causes the restitution velocity to become zero as the solver enforces constraints on the other DOFs.
This limitation applies to both angular and linear limits, however it is generally most apparent with limited angular DOFs. Disabling joint projection and increasing the solver iteration count may improve this behavior to some extent.
Also, combining soft joint limits with joint drives driving against those limits may affect stability.
Range: [0,1]
Default: 0.0 -
setRestitution
public void setRestitution(float value) Controls the amount of bounce when the joint hits a limit.A restitution value of 1.0 causes the joint to bounce back with the velocity which it hit the limit. A value of zero causes the joint to stop dead.
In situations where the joint has many locked DOFs (e.g. 5) the restitution may not be applied correctly. This is due to a limitation in the solver which causes the restitution velocity to become zero as the solver enforces constraints on the other DOFs.
This limitation applies to both angular and linear limits, however it is generally most apparent with limited angular DOFs. Disabling joint projection and increasing the solver iteration count may improve this behavior to some extent.
Also, combining soft joint limits with joint drives driving against those limits may affect stability.
Range: [0,1]
Default: 0.0 -
getBounceThreshold
public float getBounceThreshold()determines the minimum impact velocity which will cause the joint to bounce -
setBounceThreshold
public void setBounceThreshold(float value) determines the minimum impact velocity which will cause the joint to bounce -
getStiffness
public float getStiffness()if greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limitRange: [0, PX_MAX_F32)
Default: 0.0 -
setStiffness
public void setStiffness(float value) if greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limitRange: [0, PX_MAX_F32)
Default: 0.0 -
getDamping
public float getDamping()if spring is greater than zero, this is the damping of the limit springRange: [0, PX_MAX_F32)
Default: 0.0 -
setDamping
public void setDamping(float value) if spring is greater than zero, this is the damping of the limit springRange: [0, PX_MAX_F32)
Default: 0.0 -
isValid
public boolean isValid()Returns true if the current settings are valid.- Returns:
- true if the current settings are valid
-
isSoft
public boolean isSoft()- Returns:
- WebIDL type: boolean
-