Skip to main content

ConfigurableJointExtensions

A static class in Root.Township, the global namespace.

Extension methods that set a ConfigurableJoint's target rotation from a wanted rotation, taking the joint's axes into account.

Methods​

MemberWhat it is
static Quaternion GetWorldToJoint(ConfigurableJoint joint)Rotation from the joint's axis and secondary axis into joint space.
static void SetTargetRotation(ConfigurableJoint joint, Quaternion targetWorldRotation, Quaternion startWorldRotation)Sets the target rotation from world rotations. Logs an error if the joint isn't in world space.
static void SetTargetRotationLocal(ConfigurableJoint joint, Quaternion targetLocalRotation, Quaternion startLocalRotation)Sets the target rotation from local rotations. Logs an error if the joint is in world space.
1 private and internal method
MemberWhat it is
private static void SetTargetRotationInternal(ConfigurableJoint joint, Quaternion targetRotation, Quaternion startRotation, Space space)Shared maths for the two setters.