> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksjoint.md).

# Class ksJoint

Namespace: [KS.Reactor.Server](/reactor/api-reference/ks.reactor.server.md)\
Assembly: KSReactor.dll

The base class of all joints.

```csharp
public abstract class ksJoint : ksServerEntityScript, ksScript<ksIServerEntity, ksServerEntityScript>.IInternals
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← ksScript\<ksIServerEntity, ksServerEntityScript> ← [ksServerEntityScript](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksserverentityscript.md) ← [ksJoint](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksjoint.md)

#### Derived

[ksFixedJoint](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksfixedjoint.md)

#### Implements

ksScript\<ksIServerEntity, ksServerEntityScript>.IInternals

#### Inherited Members

[ksServerEntityScript.Entity](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksserverentityscript.md#KS_Reactor_Server_ksServerEntityScript_Entity), [ksServerEntityScript.Room](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksserverentityscript.md#KS_Reactor_Server_ksServerEntityScript_Room), [ksServerEntityScript.Time](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksserverentityscript.md#KS_Reactor_Server_ksServerEntityScript_Time), [ksServerEntityScript.Physics](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksserverentityscript.md#KS_Reactor_Server_ksServerEntityScript_Physics), [ksServerEntityScript.Properties](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksserverentityscript.md#KS_Reactor_Server_ksServerEntityScript_Properties), [ksServerEntityScript.Transform](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksserverentityscript.md#KS_Reactor_Server_ksServerEntityScript_Transform), [ksServerEntityScript.Transform2D](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksserverentityscript.md#KS_Reactor_Server_ksServerEntityScript_Transform2D), ksScript\<ksIServerEntity, ksServerEntityScript>.InstanceType, ksScript\<ksIServerEntity, ksServerEntityScript>.IsAttached, ksScript\<ksIServerEntity, ksServerEntityScript>.Scripts, ksScript\<ksIServerEntity, ksServerEntityScript>.Assets, ksScript\<ksIServerEntity, ksServerEntityScript>.Attached(), ksScript\<ksIServerEntity, ksServerEntityScript>.Initialize(), ksScript\<ksIServerEntity, ksServerEntityScript>.Detached(), ksScript\<ksIServerEntity, ksServerEntityScript>.Clone(), [object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)), [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)), [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Constructors

### ksJoint() <a href="#ks_reactor_server_ksjoint__ctor" id="ks_reactor_server_ksjoint__ctor"></a>

Constructor

```csharp
public ksJoint()
```

## Fields

### m\_connectedAnchor <a href="#ks_reactor_server_ksjoint_m_connectedanchor" id="ks_reactor_server_ksjoint_m_connectedanchor"></a>

```csharp
protected ksVector3 m_connectedAnchor
```

#### Field Value

ksVector3

### m\_connectedAxisRotation <a href="#ks_reactor_server_ksjoint_m_connectedaxisrotation" id="ks_reactor_server_ksjoint_m_connectedaxisrotation"></a>

```csharp
protected ksQuaternion m_connectedAxisRotation
```

#### Field Value

ksQuaternion

### m\_connectedBody <a href="#ks_reactor_server_ksjoint_m_connectedbody" id="ks_reactor_server_ksjoint_m_connectedbody"></a>

```csharp
protected ksBaseRigidBody m_connectedBody
```

#### Field Value

[ksBaseRigidBody](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksbaserigidbody.md)

### m\_connectedMassScale <a href="#ks_reactor_server_ksjoint_m_connectedmassscale" id="ks_reactor_server_ksjoint_m_connectedmassscale"></a>

```csharp
protected float m_connectedMassScale
```

#### Field Value

[float](https://learn.microsoft.com/dotnet/api/system.single)

### m\_joint <a href="#ks_reactor_server_ksjoint_m_joint" id="ks_reactor_server_ksjoint_m_joint"></a>

```csharp
protected pxJoint m_joint
```

#### Field Value

[pxJoint](/reactor/api-reference/ks.reactor.server.physx/ks.reactor.server.physx.pxjoint.md)

### m\_localAnchor <a href="#ks_reactor_server_ksjoint_m_localanchor" id="ks_reactor_server_ksjoint_m_localanchor"></a>

```csharp
protected ksVector3 m_localAnchor
```

#### Field Value

ksVector3

### m\_localAxisRotation <a href="#ks_reactor_server_ksjoint_m_localaxisrotation" id="ks_reactor_server_ksjoint_m_localaxisrotation"></a>

```csharp
protected ksQuaternion m_localAxisRotation
```

#### Field Value

ksQuaternion

### m\_localBody <a href="#ks_reactor_server_ksjoint_m_localbody" id="ks_reactor_server_ksjoint_m_localbody"></a>

```csharp
protected ksBaseRigidBody m_localBody
```

#### Field Value

[ksBaseRigidBody](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksbaserigidbody.md)

### m\_localMassScale <a href="#ks_reactor_server_ksjoint_m_localmassscale" id="ks_reactor_server_ksjoint_m_localmassscale"></a>

```csharp
protected float m_localMassScale
```

#### Field Value

[float](https://learn.microsoft.com/dotnet/api/system.single)

## Properties

### Anchor <a href="#ks_reactor_server_ksjoint_anchor" id="ks_reactor_server_ksjoint_anchor"></a>

Position of the anchor around which the joints motion is constrained relative to the local rigidbody.

```csharp
public ksVector3 Anchor { get; set; }
```

#### Property Value

ksVector3

### AutoConfigureConnectedAnchor <a href="#ks_reactor_server_ksjoint_autoconfigureconnectedanchor" id="ks_reactor_server_ksjoint_autoconfigureconnectedanchor"></a>

Should the connected anchor and axis be calculated automatically when attaching a new connected rigidbody?

```csharp
public bool AutoConfigureConnectedAnchor { get; set; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### Axis <a href="#ks_reactor_server_ksjoint_axis" id="ks_reactor_server_ksjoint_axis"></a>

Direction of the axis around which the body is constrained relative to the local rigidbody.

```csharp
public ksVector3 Axis { get; set; }
```

#### Property Value

ksVector3

### BreakForce <a href="#ks_reactor_server_ksjoint_breakforce" id="ks_reactor_server_ksjoint_breakforce"></a>

The force that needs to be applied for this joint to break.

```csharp
public float BreakForce { get; set; }
```

#### Property Value

[float](https://learn.microsoft.com/dotnet/api/system.single)

### BreakTorque <a href="#ks_reactor_server_ksjoint_breaktorque" id="ks_reactor_server_ksjoint_breaktorque"></a>

The torque that needs to be applied for this joint to break.

```csharp
public float BreakTorque { get; set; }
```

#### Property Value

[float](https://learn.microsoft.com/dotnet/api/system.single)

### ConnectedAnchor <a href="#ks_reactor_server_ksjoint_connectedanchor" id="ks_reactor_server_ksjoint_connectedanchor"></a>

Position of the anchor around which the joints motion is constrained relative to the connected rigidbody.

```csharp
public ksVector3 ConnectedAnchor { get; set; }
```

#### Property Value

ksVector3

### ConnectedAxis <a href="#ks_reactor_server_ksjoint_connectedaxis" id="ks_reactor_server_ksjoint_connectedaxis"></a>

Direction of the axis around which the body is constrained relative to the connected rigidbody.

```csharp
public ksVector3 ConnectedAxis { get; set; }
```

#### Property Value

ksVector3

### ConnectedBody <a href="#ks_reactor_server_ksjoint_connectedbody" id="ks_reactor_server_ksjoint_connectedbody"></a>

The rigidbody the joint connects to.

```csharp
public ksBaseRigidBody ConnectedBody { get; set; }
```

#### Property Value

[ksBaseRigidBody](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksbaserigidbody.md)

### ConnectedMassScale <a href="#ks_reactor_server_ksjoint_connectedmassscale" id="ks_reactor_server_ksjoint_connectedmassscale"></a>

The scale to apply to the inverse mass and inertia tensor of the connected body prior to solving the constraints.

```csharp
public float ConnectedMassScale { get; set; }
```

#### Property Value

[float](https://learn.microsoft.com/dotnet/api/system.single)

### CurrentForce <a href="#ks_reactor_server_ksjoint_currentforce" id="ks_reactor_server_ksjoint_currentforce"></a>

The force applied by the solver to satisfy all constraints.

```csharp
public ksVector3 CurrentForce { get; }
```

#### Property Value

ksVector3

### CurrentTorque <a href="#ks_reactor_server_ksjoint_currenttorque" id="ks_reactor_server_ksjoint_currenttorque"></a>

The torque applied by the solver to satisfy all constraints.

```csharp
public ksVector3 CurrentTorque { get; }
```

#### Property Value

ksVector3

### EnableCollision <a href="#ks_reactor_server_ksjoint_enablecollision" id="ks_reactor_server_ksjoint_enablecollision"></a>

Enable collision between bodies connected with the joint.

```csharp
public bool EnableCollision { get; set; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### EnablePreprocessing <a href="#ks_reactor_server_ksjoint_enablepreprocessing" id="ks_reactor_server_ksjoint_enablepreprocessing"></a>

Toggle preprocessing for this joint.

```csharp
public bool EnablePreprocessing { get; set; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### IsBroken <a href="#ks_reactor_server_ksjoint_isbroken" id="ks_reactor_server_ksjoint_isbroken"></a>

Is the joint broken?

```csharp
public bool IsBroken { get; set; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### LocalBody <a href="#ks_reactor_server_ksjoint_localbody" id="ks_reactor_server_ksjoint_localbody"></a>

Get the local rigidbody the joint is connected to.

```csharp
public ksBaseRigidBody LocalBody { get; }
```

#### Property Value

[ksBaseRigidBody](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksbaserigidbody.md)

### MassScale <a href="#ks_reactor_server_ksjoint_massscale" id="ks_reactor_server_ksjoint_massscale"></a>

The scale to apply to the inverse mass and inertia tensor of the body prior to solving the constraints.

```csharp
public float MassScale { get; set; }
```

#### Property Value

[float](https://learn.microsoft.com/dotnet/api/system.single)

## Methods

### CreateJoint() <a href="#ks_reactor_server_ksjoint_createjoint" id="ks_reactor_server_ksjoint_createjoint"></a>

Creates the joint.

```csharp
protected abstract void CreateJoint()
```

### Detached() <a href="#ks_reactor_server_ksjoint_detached" id="ks_reactor_server_ksjoint_detached"></a>

Cleans up the joint.

```csharp
public override void Detached()
```

### Initialize() <a href="#ks_reactor_server_ksjoint_initialize" id="ks_reactor_server_ksjoint_initialize"></a>

Initializes the joint.

```csharp
public override void Initialize()
```

### ReconfigureConnectedAchors() <a href="#ks_reactor_server_ksjoint_reconfigureconnectedachors" id="ks_reactor_server_ksjoint_reconfigureconnectedachors"></a>

Reconfigures the connected anchors.

```csharp
protected void ReconfigureConnectedAchors()
```

### WorldAnchor() <a href="#ks_reactor_server_ksjoint_worldanchor" id="ks_reactor_server_ksjoint_worldanchor"></a>

Gets the anchor position in world coordinates.

```csharp
protected ksVector3 WorldAnchor()
```

#### Returns

ksVector3

Anchor position in world coordinates.

### OnBreak <a href="#ks_reactor_server_ksjoint_onbreak" id="ks_reactor_server_ksjoint_onbreak"></a>

Callback invoked when the joint breaks.

```csharp
public event ksJoint.JointBreakCallback OnBreak
```

#### Event Type

[ksJoint](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksjoint.md).[JointBreakCallback](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksjoint/ks.reactor.server.ksjoint.jointbreakcallback.md)
