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

# Class ksPhysicsMaterial

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

A physics material that controls the friction and restitution of colliders.

```csharp
public sealed class ksPhysicsMaterial : ksScriptAsset
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) â† ksScriptAsset â† [ksPhysicsMaterial](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksphysicsmaterial.md)

#### Inherited Members

ksScriptAsset.Assets, ksScriptAsset.AssetId, ksScriptAsset.AssetPath, ksScriptAsset.IsPrefab, ksScriptAsset.AssetName, ksScriptAsset.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.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Constructors

### ksPhysicsMaterial() <a href="#ks_reactor_server_ksphysicsmaterial__ctor" id="ks_reactor_server_ksphysicsmaterial__ctor"></a>

Constructor

```csharp
public ksPhysicsMaterial()
```

## Properties

### Default <a href="#ks_reactor_server_ksphysicsmaterial_default" id="ks_reactor_server_ksphysicsmaterial_default"></a>

The default physics material. Setting this to a new instance will not affect any existing colliders using the old default material, but will change the material used by new colliders that don't have a material assigned.

```csharp
public static ksPhysicsMaterial Default { get; set; }
```

#### Property Value

[ksPhysicsMaterial](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksphysicsmaterial.md)

### DynamicFriction <a href="#ks_reactor_server_ksphysicsmaterial_dynamicfriction" id="ks_reactor_server_ksphysicsmaterial_dynamicfriction"></a>

The friction used when an object is moving. Usually a value from zero to one.

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

#### Property Value

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

### FrictionCombineMode <a href="#ks_reactor_server_ksphysicsmaterial_frictioncombinemode" id="ks_reactor_server_ksphysicsmaterial_frictioncombinemode"></a>

Determines how friction between two colliders is combined.

```csharp
public ksPhysicsMaterial.CombineMode FrictionCombineMode { get; set; }
```

#### Property Value

[ksPhysicsMaterial](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksphysicsmaterial.md).[CombineMode](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksphysicsmaterial/ks.reactor.server.ksphysicsmaterial.combinemode.md)

### PhysXMaterial <a href="#ks_reactor_server_ksphysicsmaterial_physxmaterial" id="ks_reactor_server_ksphysicsmaterial_physxmaterial"></a>

The PhysX material.

```csharp
public pxMaterial PhysXMaterial { get; }
```

#### Property Value

[pxMaterial](/reactor/api-reference/ks.reactor.server.physx/ks.reactor.server.physx.pxmaterial.md)

### Restitution <a href="#ks_reactor_server_ksphysicsmaterial_restitution" id="ks_reactor_server_ksphysicsmaterial_restitution"></a>

The coefficient of restitution, or bounciness. A value of zero will not bounce, and a value of one will bounce without any energy loss.

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

#### Property Value

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

### RestitutionCombineMode <a href="#ks_reactor_server_ksphysicsmaterial_restitutioncombinemode" id="ks_reactor_server_ksphysicsmaterial_restitutioncombinemode"></a>

Determines how [Restitution](#KS_Reactor_Server_ksPhysicsMaterial_Restitution) between two colliders is combined.s

```csharp
public ksPhysicsMaterial.CombineMode RestitutionCombineMode { get; set; }
```

#### Property Value

[ksPhysicsMaterial](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksphysicsmaterial.md).[CombineMode](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksphysicsmaterial/ks.reactor.server.ksphysicsmaterial.combinemode.md)

### StaticFriction <a href="#ks_reactor_server_ksphysicsmaterial_staticfriction" id="ks_reactor_server_ksphysicsmaterial_staticfriction"></a>

The friction used when an object is laying still on a surface. Usually a value from zero to one.

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

#### Property Value

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

## Methods

### Get(pxMaterial) <a href="#ks_reactor_server_ksphysicsmaterial_get_ks_reactor_server_physx_pxmaterial" id="ks_reactor_server_ksphysicsmaterial_get_ks_reactor_server_physx_pxmaterial"></a>

Gets the physics material for a [pxMaterial](/reactor/api-reference/ks.reactor.server.physx/ks.reactor.server.physx.pxmaterial.md). Creates one if it does not already exist.

```csharp
public static ksPhysicsMaterial Get(pxMaterial material)
```

#### Parameters

`material` [pxMaterial](/reactor/api-reference/ks.reactor.server.physx/ks.reactor.server.physx.pxmaterial.md)

Material

#### Returns

[ksPhysicsMaterial](/reactor/api-reference/ks.reactor.server/ks.reactor.server.ksphysicsmaterial.md)

Physics material
