Version: 2017.2
public Transform customSimulationSpace ;

Description

Simulate particles relative to a custom transform component.

using System.Collections;
using UnityEngine;

public class ExampleClass : MonoBehaviour { private ParticleSystem ps; public Transform relativeTo;

void Start() { ps = GetComponent<ParticleSystem>();

var main = ps.main; main.simulationSpace = ParticleSystemSimulationSpace.Custom; main.customSimulationSpace = relativeTo; } }