# Simulate

> Simulate the world. If deltaTime is zero then only contact and trigger events will be updated and no velocity or position integration or constraint updates will occur.

## Definition

* **Type:** Method
* **Namespace:** [Unity.U2D.Physics](/engine/6000.7/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

## Simulate(float)

Simulate the world. If `deltaTime` is zero then only contact and trigger events will be updated and no velocity or position integration or constraint updates will occur.

```csharp
public void Simulate(float deltaTime)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The amount of time to forward simulate the world.

## Simulate(ReadOnlySpan\<PhysicsWorld>, float)

Simulate a batch of worlds. If `deltaTime` is zero then only contact and trigger events will be updated and no velocity or position integration or constraint updates will occur. The worlds can be simulated concurrently depending on the setting of [\_concurrentSimulations](/engine/6000.7/script-reference/unity/u2d/physics/physicscoresettings2d/concurrentsimulations.md).

```csharp
public static int Simulate(ReadOnlySpan<PhysicsWorld> worlds, float deltaTime)
```

### Parameters

**** (\[ReadOnlySpan\<PhysicsWorld>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): The worlds to forward simulate.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The amount of time to forward simulate the world.

### Returns

| Type                                                       | Description                                                                                                                                                                                                                      |
| ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The number of worlds that were ignored (not simulated because the world was invalid). A single warning is logged when any are ignored. If the delta time is invalid, nothing is simulated and every world is counted as ignored. |
