Skip to content

Commit

Permalink
fix: the trail is incorrect in SimulationSpace.Local
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Feb 1, 2021
1 parent 63b36a4 commit 9313489
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Scripts/UIParticleUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ private static void BakeMesh(UIParticle particle)
var hash = currentPs.GetMaterialHash(true);
if (hash != 0)
{
matrix = currentPs.main.simulationSpace == ParticleSystemSimulationSpace.Local
? matrix * Matrix4x4.Translate(-currentPs.transform.position)
: matrix;

var m = MeshHelper.GetTemporaryMesh();
try
{
Expand Down

0 comments on commit 9313489

Please sign in to comment.