Skip to content

Commit

Permalink
feat: support custom simulation space
Browse files Browse the repository at this point in the history
Close #78
  • Loading branch information
mob-sakai committed Aug 19, 2020
1 parent e070e8d commit a83e647
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Packages/UIParticle/Scripts/UIParticleUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ private static Matrix4x4 GetScaledMatrix(UIParticle particle)
* Matrix4x4.Scale(canvasTr.localScale).inverse;
case ParticleSystemSimulationSpace.World:
return transform.worldToLocalMatrix;
case ParticleSystemSimulationSpace.Custom:
// #78: Support custom simulation space.
return transform.worldToLocalMatrix
* Matrix4x4.Translate(main.customSimulationSpace.position);
default:
return Matrix4x4.identity;
}
Expand Down

0 comments on commit a83e647

Please sign in to comment.