 | IJointUtilsResetJoint Method |
Initializes joint to a consistent state.
Namespace:
KASAPIv2
Assembly:
KAS-API-v2 (in KAS-API-v2.dll) Version: KAS API v2
Syntaxvoid ResetJoint(
ConfigurableJoint joint
)
Request Example
View SourceParameters
- joint
- Type: UnityEngineConfigurableJoint
Joint to reset.
Remarks
It's not the same as creating a default joint. The state is consistent but different from the
default:
- All linear and angular drive modes set to Locked.
- All drives, springs and limits are zeroed.
- The coordinate system is reset to local. Y looks up, and X looks right.
-
The connected body is not touched. Connection, if any, won't be broken on the reset.
-
Any state accumulated so far (e.g. relative rotation or position) will be lost, and the joint
will remember the new relative rotation/position of the connected objects.
Use this method before setting up a new or existing joint. By resetting the joint, you ensure
it's in a consistent state, and the further adjustments will always give the same result
regardless to how the joint was created and what components were affecting it.
See Also