Click or drag to resize

IJointUtilsSetupDistanceJoint Method

Sets up a canonical distance joint.

Namespace:  KASAPIv2
Assembly:  KAS-API-v2 (in KAS-API-v2.dll) Version: KAS API v2
Syntax
C#
void SetupDistanceJoint(
	ConfigurableJoint joint,
	float springForce = 0f,
	float springDamper = 0f,
	float maxDistance = ∞f
)
Request Example View Source

Parameters

joint
Type: UnityEngineConfigurableJoint
The joint to setup.
springForce (Optional)
Type: SystemSingle
The strength of the spring that keeps the two objects in range.
springDamper (Optional)
Type: SystemSingle
The force to apply to calm down the oscillations.
maxDistance (Optional)
Type: SystemSingle
The maximum distance to allow between the objects before applying the spring force.
Remarks
This method does not set all the properties of the PhysX joint! To get a consistent result, the joint must be reset via a ResetJoint(ConfigurableJoint) call before invoking this method.
See Also