# CollisionMotion record

> What a collision that's one moving body says about how it moves. Only its mass is kept. Source's .phy gives one for a prop of one solid.

Namespace `EvilEngine.Formats.Collision`, assembly `EvilEngine.Formats`. Engine commit 4ff877b1.

```csharp
public sealed record CollisionMotion
```

What a [collision](/docs/api/collisioncontent) that's one moving body says about how it moves. Only its mass is kept. Source's `.phy` gives one for a prop of one solid.

```csharp
var melon = new CollisionContent([new Collider(new ColliderShape.Sphere(0.2f), ["solid"])])
{
    Motion = new CollisionMotion { Mass = 10 }
};
```

## Members

### CollisionMotion (constructor)

```csharp
public CollisionMotion()
```

Makes a motion with no mass of its own.

### Mass (property)

```csharp
public double? Mass { get; init; }
```

The body's mass in kilograms, above 0, or `null`. [IPhysicsWorld.Add](/docs/api/iphysicsworld#add) uses it when [BodySpec.Mass](/docs/api/bodyspec#mass) isn't set: 30 kg for Garry's Mod's oil drum, 10 for the melon. Left `null`, the body weighs its volume times its surface's density, or 1,000 kg/m³ when the surface has none, and 1 kg when it has no volume.
