> 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/ks.reactor.ksicharactercontroller.md).

# Interface ksICharacterController

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

Character controller interface.

```csharp
public interface ksICharacterController
```

## Properties

### CollisionFlags <a href="#ks_reactor_ksicharactercontroller_collisionflags" id="ks_reactor_ksicharactercontroller_collisionflags"></a>

What part of the capsule collided with the environment during the last CharacterController.Move call.

```csharp
ksCharacterControllerCollisionFlags CollisionFlags { get; }
```

#### Property Value

[ksCharacterControllerCollisionFlags](/reactor/api-reference/ks.reactor/ks.reactor.kscharactercontrollercollisionflags.md)

### DetectCollisions <a href="#ks_reactor_ksicharactercontroller_detectcollisions" id="ks_reactor_ksicharactercontroller_detectcollisions"></a>

Determines whether other rigidbodies or character controllers collide with this character controller.

```csharp
bool DetectCollisions { get; set; }
```

#### Property Value

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

### EnableOverlapRecovery <a href="#ks_reactor_ksicharactercontroller_enableoverlaprecovery" id="ks_reactor_ksicharactercontroller_enableoverlaprecovery"></a>

Enables or disables overlap recovery. Used to depenetrate character controllers from static objects when an overlap is detected.

```csharp
bool EnableOverlapRecovery { get; set; }
```

#### Property Value

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

### Height <a href="#ks_reactor_ksicharactercontroller_height" id="ks_reactor_ksicharactercontroller_height"></a>

The height of the character's capsule.

```csharp
float Height { get; set; }
```

#### Property Value

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

### IsGrounded <a href="#ks_reactor_ksicharactercontroller_isgrounded" id="ks_reactor_ksicharactercontroller_isgrounded"></a>

Was the CharacterController touching the ground during the last move?

```csharp
bool IsGrounded { get; }
```

#### Property Value

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

### MinMoveDistance <a href="#ks_reactor_ksicharactercontroller_minmovedistance" id="ks_reactor_ksicharactercontroller_minmovedistance"></a>

Minimum move distance of the character controller. If travelled distance is smaller, the character doesn't move. This is used to stop the recursive motion algorithm when remaining distance to travel is small.

```csharp
float MinMoveDistance { get; set; }
```

#### Property Value

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

### Offset <a href="#ks_reactor_ksicharactercontroller_offset" id="ks_reactor_ksicharactercontroller_offset"></a>

The offset of the character's collider relative to the transform's position.

```csharp
ksVector3 Offset { get; set; }
```

#### Property Value

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

### Radius <a href="#ks_reactor_ksicharactercontroller_radius" id="ks_reactor_ksicharactercontroller_radius"></a>

The radius of the character's capsule.

```csharp
float Radius { get; set; }
```

#### Property Value

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

### SkinWidth <a href="#ks_reactor_ksicharactercontroller_skinwidth" id="ks_reactor_ksicharactercontroller_skinwidth"></a>

Collision skin width.

```csharp
float SkinWidth { get; set; }
```

#### Property Value

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

### SlopeLimit <a href="#ks_reactor_ksicharactercontroller_slopelimit" id="ks_reactor_ksicharactercontroller_slopelimit"></a>

Slope limit in degrees.

```csharp
float SlopeLimit { get; set; }
```

#### Property Value

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

### StepOffset <a href="#ks_reactor_ksicharactercontroller_stepoffset" id="ks_reactor_ksicharactercontroller_stepoffset"></a>

Step offset.

```csharp
float StepOffset { get; set; }
```

#### Property Value

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

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

The current relative velocity of the character.

```csharp
ksVector3 Velocity { get; }
```

#### Property Value

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

## Methods

### Move(ksVector3) <a href="#ks_reactor_ksicharactercontroller_move_ks_reactor_ksvector3" id="ks_reactor_ksicharactercontroller_move_ks_reactor_ksvector3"></a>

Moves the character with a displacement vector. Users are responsible for applying gravity to characters.

```csharp
ksCharacterControllerCollisionFlags Move(ksVector3 motion)
```

#### Parameters

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

#### Returns

[ksCharacterControllerCollisionFlags](/reactor/api-reference/ks.reactor/ks.reactor.kscharactercontrollercollisionflags.md)

### SimpleMove(ksVector3) <a href="#ks_reactor_ksicharactercontroller_simplemove_ks_reactor_ksvector3" id="ks_reactor_ksicharactercontroller_simplemove_ks_reactor_ksvector3"></a>

Moves the character with velocity. Gravity is automatically applied. Returns if the character is grounded.

```csharp
bool SimpleMove(ksVector3 velocity)
```

#### Parameters

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

#### Returns

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

True if the character is grounded.

### OnColliderHit <a href="#ks_reactor_ksicharactercontroller_oncolliderhit" id="ks_reactor_ksicharactercontroller_oncolliderhit"></a>

Invoked when the character controller hit a collider.

```csharp
event ksCharacterControllerEvents.ColliderHitHandler OnColliderHit
```

#### Event Type

[ksCharacterControllerEvents](/reactor/api-reference/ks.reactor/ks.reactor.kscharactercontrollerevents.md).[ColliderHitHandler](/reactor/api-reference/ks.reactor/ks.reactor.kscharactercontrollerevents/ks.reactor.kscharactercontrollerevents.colliderhithandler.md)
