> 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.client.unity/ks.reactor.client.unity.ksbaseunityrigidbody.md).

# Class ksBaseUnityRigidBody

Namespace: [KS.Reactor.Client.Unity](/reactor/api-reference/ks.reactor.client.unity.md)\
Assembly: KSUnity-Source.dll

Base class for classes that wrap a Unity [Rigidbody](#KS_Reactor_Client_Unity_ksBaseUnityRigidBody_Rigidbody) for use with Reactor.

```csharp
public class ksBaseUnityRigidBody
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) â† [ksBaseUnityRigidBody](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksbaseunityrigidbody.md)

#### Derived

[ksUnityRigidBody](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksunityrigidbody.md), [ksUnityRigidBody2DView](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksunityrigidbody2dview.md)

#### Inherited Members

[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

### ksBaseUnityRigidBody(Rigidbody, bool) <a href="#ks_reactor_client_unity_ksbaseunityrigidbody__ctor_unityengine_rigidbody_system_boolean" id="ks_reactor_client_unity_ksbaseunityrigidbody__ctor_unityengine_rigidbody_system_boolean"></a>

Constructor

```csharp
public ksBaseUnityRigidBody(Rigidbody rigidBody, bool forceKinematic)
```

#### Parameters

`rigidBody` Rigidbody

Unity rigid body.

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

If true, sets the Unity rigidbody to kinematic so Unity physics doesn't try to move the object.

## Fields

### m\_rigidBody <a href="#ks_reactor_client_unity_ksbaseunityrigidbody_m_rigidbody" id="ks_reactor_client_unity_ksbaseunityrigidbody_m_rigidbody"></a>

```csharp
protected Rigidbody m_rigidBody
```

#### Field Value

Rigidbody

## Properties

### AngularDrag <a href="#ks_reactor_client_unity_ksbaseunityrigidbody_angulardrag" id="ks_reactor_client_unity_ksbaseunityrigidbody_angulardrag"></a>

Angular damping.

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

#### Property Value

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

### CenterOfMass <a href="#ks_reactor_client_unity_ksbaseunityrigidbody_centerofmass" id="ks_reactor_client_unity_ksbaseunityrigidbody_centerofmass"></a>

The rigidbody's center of mass in local space.

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

#### Property Value

[ksVector3](/reactor/api-reference/ks.reactor/ks.reactor.ksvector3.md)

### DefaultType <a href="#ks_reactor_client_unity_ksbaseunityrigidbody_defaulttype" id="ks_reactor_client_unity_ksbaseunityrigidbody_defaulttype"></a>

Determines if rigid bodies are 3D or 2D by default when spawning prefabs or loading the scene.

```csharp
public static ksRigidBodyModes DefaultType { get; set; }
```

#### Property Value

[ksRigidBodyModes](/reactor/api-reference/ks.reactor/ks.reactor.ksrigidbodymodes.md)

### Drag <a href="#ks_reactor_client_unity_ksbaseunityrigidbody_drag" id="ks_reactor_client_unity_ksbaseunityrigidbody_drag"></a>

Damping.

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

#### Property Value

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

### ForceKinematic <a href="#ks_reactor_client_unity_ksbaseunityrigidbody_forcekinematic" id="ks_reactor_client_unity_ksbaseunityrigidbody_forcekinematic"></a>

If true, the isKinematic will be set to true regardless of the value of [IsKinematic](#KS_Reactor_Client_Unity_ksBaseUnityRigidBody_IsKinematic) to prevent Unity physics from affecting the rigid body. Setting to false will set the isKinematic back to the [IsKinematic](#KS_Reactor_Client_Unity_ksBaseUnityRigidBody_IsKinematic) value.

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

#### Property Value

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

### IsKinematic <a href="#ks_reactor_client_unity_ksbaseunityrigidbody_iskinematic" id="ks_reactor_client_unity_ksbaseunityrigidbody_iskinematic"></a>

If true, the entity will not be effected by gravity or other impulses, but may be moved around by setting translation and rotation from scripts. When [ForceKinematic](#KS_Reactor_Client_Unity_ksBaseUnityRigidBody_ForceKinematic) is true, this value is different from isKinematic, which is set to true to prevent Unity physics from affecting the rigid body.

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

#### Property Value

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

### Mass <a href="#ks_reactor_client_unity_ksbaseunityrigidbody_mass" id="ks_reactor_client_unity_ksbaseunityrigidbody_mass"></a>

Mass of the rigid body.

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

#### Property Value

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

### Rigidbody <a href="#ks_reactor_client_unity_ksbaseunityrigidbody_rigidbody" id="ks_reactor_client_unity_ksbaseunityrigidbody_rigidbody"></a>

The wrapped rigid body.

```csharp
public Rigidbody Rigidbody { get; }
```

#### Property Value

Rigidbody

### UseGravity <a href="#ks_reactor_client_unity_ksbaseunityrigidbody_usegravity" id="ks_reactor_client_unity_ksbaseunityrigidbody_usegravity"></a>

If true, the entity will be affected by the scene gravity.

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

#### Property Value

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