diff --git a/Runtime/UIParticleRenderer.cs b/Runtime/UIParticleRenderer.cs index e85d258..a73b4b4 100644 --- a/Runtime/UIParticleRenderer.cs +++ b/Runtime/UIParticleRenderer.cs @@ -548,6 +548,24 @@ namespace Coffee.UIExtensions * Matrix4x4.Scale(scale) * Matrix4x4.Translate(-psPos); } + + if (_mainEmitter) + { + if (_mainEmitter.IsLocalSpace()) + { + return Matrix4x4.Translate(psPos) + * Matrix4x4.Scale(scale) + * Matrix4x4.Translate(-psPos); + } + else + { + psPos = _particleSystem.transform.position - _mainEmitter.transform.position; + return Matrix4x4.Translate(psPos) + * Matrix4x4.Scale(scale) + * Matrix4x4.Translate(-psPos); + } + } + return Matrix4x4.Scale(scale); case ParticleSystemSimulationSpace.Custom: return Matrix4x4.Translate(_particleSystem.main.customSimulationSpace.position.GetScaled(scale))