# ParticleSystemSimulationSpace

> Defines the coordinate space in which particles are simulated.

## Definition

* **Type:** Enum
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.ParticleSystemModule

```csharp
public enum ParticleSystemSimulationSpace
```

## Remarks

The simulation space determines how particles' positions are calculated relative to their environment. This property controls whether particles are simulated in local space, world space, or relative to a custom transform. The space is defined by the `ParticleSystemSimulationSpace` enum.

For custom space simulation, use [\_customSimulationSpace](/engine/6000.7/script-reference/unityengine/particlesystem/mainmodule/customsimulationspace.md) to assign a specific Transform as the reference.

Additional Resources: [ParticleSystem.MainModule](/engine/6000.7/script-reference/unityengine/particlesystem/mainmodule.md)

## Examples

```csharp
using UnityEngine;

public class ParticleSimulationExample : MonoBehaviour
{
    [SerializeField] private ParticleSystem particleSystem;
    [SerializeField] private Transform customTransform;

    void Start()
    {
        var mainModule = particleSystem.main;

        // Set the simulation space to Custom and assign a transform.
        mainModule.simulationSpace = ParticleSystemSimulationSpace.Custom;
        mainModule.customSimulationSpace = customTransform;
    }
}
```

## Fields

| Value                                                                                         | Description                                                                                                                                                                                        |
| --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Custom](/engine/6000.7/script-reference/unityengine/particlesystemsimulationspace/custom.md) | Simulate particles relative to a custom transform component, defined by [\_customSimulationSpace](/engine/6000.7/script-reference/unityengine/particlesystem/mainmodule/customsimulationspace.md). |
| [Local](/engine/6000.7/script-reference/unityengine/particlesystemsimulationspace/local.md)   | Simulate particles in local space.                                                                                                                                                                 |
| [World](/engine/6000.7/script-reference/unityengine/particlesystemsimulationspace/world.md)   | Simulate particles in world space.                                                                                                                                                                 |
