fix: the trail is incorrect in SimulationSpace.Local

pull/150/head
mob-sakai 2021-02-01 23:21:22 +09:00
parent 63b36a45b9
commit 9313489552
1 changed files with 4 additions and 0 deletions

View File

@ -241,6 +241,10 @@ namespace Coffee.UIExtensions
var hash = currentPs.GetMaterialHash(true); var hash = currentPs.GetMaterialHash(true);
if (hash != 0) if (hash != 0)
{ {
matrix = currentPs.main.simulationSpace == ParticleSystemSimulationSpace.Local
? matrix * Matrix4x4.Translate(-currentPs.transform.position)
: matrix;
var m = MeshHelper.GetTemporaryMesh(); var m = MeshHelper.GetTemporaryMesh();
try try
{ {