> 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.ksunityrigidbody2dview.md).

# Class ksUnityRigidBody2DView

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

Wraps a Unity Rigidbody for use with Reactor using a 2D interface.

```csharp
public class ksUnityRigidBody2DView : ksBaseUnityRigidBody, ksIRigidBody2D
```

#### Inheritance

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

#### Implements

[ksIRigidBody2D](/reactor/api-reference/ks.reactor/ks.reactor.ksirigidbody2d.md)

#### Inherited Members

[ksBaseUnityRigidBody.DefaultType](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksbaseunityrigidbody.md#KS_Reactor_Client_Unity_ksBaseUnityRigidBody_DefaultType), [ksBaseUnityRigidBody.Rigidbody](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksbaseunityrigidbody.md#KS_Reactor_Client_Unity_ksBaseUnityRigidBody_Rigidbody), [ksBaseUnityRigidBody.ForceKinematic](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksbaseunityrigidbody.md#KS_Reactor_Client_Unity_ksBaseUnityRigidBody_ForceKinematic), [ksBaseUnityRigidBody.m\_rigidBody](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksbaseunityrigidbody.md#KS_Reactor_Client_Unity_ksBaseUnityRigidBody_m_rigidBody), [ksBaseUnityRigidBody.Mass](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksbaseunityrigidbody.md#KS_Reactor_Client_Unity_ksBaseUnityRigidBody_Mass), [ksBaseUnityRigidBody.Drag](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksbaseunityrigidbody.md#KS_Reactor_Client_Unity_ksBaseUnityRigidBody_Drag), [ksBaseUnityRigidBody.AngularDrag](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksbaseunityrigidbody.md#KS_Reactor_Client_Unity_ksBaseUnityRigidBody_AngularDrag), [ksBaseUnityRigidBody.UseGravity](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksbaseunityrigidbody.md#KS_Reactor_Client_Unity_ksBaseUnityRigidBody_UseGravity), [ksBaseUnityRigidBody.IsKinematic](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksbaseunityrigidbody.md#KS_Reactor_Client_Unity_ksBaseUnityRigidBody_IsKinematic), [ksBaseUnityRigidBody.CenterOfMass](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksbaseunityrigidbody.md#KS_Reactor_Client_Unity_ksBaseUnityRigidBody_CenterOfMass), [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

### ksUnityRigidBody2DView(Rigidbody, bool) <a href="#ks_reactor_client_unity_ksunityrigidbody2dview__ctor_unityengine_rigidbody_system_boolean" id="ks_reactor_client_unity_ksunityrigidbody2dview__ctor_unityengine_rigidbody_system_boolean"></a>

Constructor

```csharp
public ksUnityRigidBody2DView(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.

## Properties

### AngularVelocity <a href="#ks_reactor_client_unity_ksunityrigidbody2dview_angularvelocity" id="ks_reactor_client_unity_ksunityrigidbody2dview_angularvelocity"></a>

Angular velocity in degrees per second.

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

#### Property Value

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

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

The rigidbody's center of mass in local space.

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

#### Property Value

[ksVector2](/reactor/api-reference/ks.reactor/ks.reactor.ksvector2.md)

### Constraints <a href="#ks_reactor_client_unity_ksunityrigidbody2dview_constraints" id="ks_reactor_client_unity_ksunityrigidbody2dview_constraints"></a>

Controls which degrees of freedom are allowed for the simulation of this rigidbody.

```csharp
public ksRigidBody2DConstraints Constraints { get; set; }
```

#### Property Value

[ksRigidBody2DConstraints](/reactor/api-reference/ks.reactor/ks.reactor.ksrigidbody2dconstraints.md)

### KinematicMovement <a href="#ks_reactor_client_unity_ksunityrigidbody2dview_kinematicmovement" id="ks_reactor_client_unity_ksunityrigidbody2dview_kinematicmovement"></a>

Amount of movement that will be applied to a kinematic rigid body entity during the next physics simulation step. After the simulation step this value will be reset to [Zero](/reactor/api-reference/ks.reactor/ks.reactor.ksvector2.md#KS_Reactor_ksVector2_Zero).

```csharp
public ksVector2 KinematicMovement { get; set; }
```

#### Property Value

[ksVector2](/reactor/api-reference/ks.reactor/ks.reactor.ksvector2.md)

### KinematicRotation <a href="#ks_reactor_client_unity_ksunityrigidbody2dview_kinematicrotation" id="ks_reactor_client_unity_ksunityrigidbody2dview_kinematicrotation"></a>

Amount of rotation in degrees that will be applied to a kinematic rigid body entity during the next physics simulation step. After the simulation step this value will be reset to zero.

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

#### Property Value

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

### KinematicRotationRadians <a href="#ks_reactor_client_unity_ksunityrigidbody2dview_kinematicrotationradians" id="ks_reactor_client_unity_ksunityrigidbody2dview_kinematicrotationradians"></a>

Amount of rotation in radians that will be applied to a kinematic rigid body entity during the next physics simulation step. After the simulation step this value will be reset to zero.

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

#### Property Value

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

### Velocity <a href="#ks_reactor_client_unity_ksunityrigidbody2dview_velocity" id="ks_reactor_client_unity_ksunityrigidbody2dview_velocity"></a>

Linear velocity

```csharp
public ksVector2 Velocity { get; set; }
```

#### Property Value

[ksVector2](/reactor/api-reference/ks.reactor/ks.reactor.ksvector2.md)

## Methods

### ClearKinematicMotion() <a href="#ks_reactor_client_unity_ksunityrigidbody2dview_clearkinematicmotion" id="ks_reactor_client_unity_ksunityrigidbody2dview_clearkinematicmotion"></a>

Clear the Kinematic movement and rotation values.

```csharp
public void ClearKinematicMotion()
```
