本文整理匯總了C#中UnityEngine.ParticleSystem.GetLocalToWorldMatrix方法的典型用法代碼示例。如果您正苦於以下問題:C# ParticleSystem.GetLocalToWorldMatrix方法的具體用法?C# ParticleSystem.GetLocalToWorldMatrix怎麽用?C# ParticleSystem.GetLocalToWorldMatrix使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UnityEngine.ParticleSystem
的用法示例。
在下文中一共展示了ParticleSystem.GetLocalToWorldMatrix方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: RenderCollisionBounds
private static void RenderCollisionBounds(ParticleSystem system, GizmoType gizmoType)
{
if (system.trigger.enabled && s_VisualizeBounds)
{
ParticleSystem.Particle[] particles = new ParticleSystem.Particle[system.particleCount];
int num = system.GetParticles(particles);
Color color = Gizmos.color;
Gizmos.color = Color.green;
Matrix4x4 identity = Matrix4x4.identity;
if (system.main.simulationSpace == ParticleSystemSimulationSpace.Local)
{
identity = system.GetLocalToWorldMatrix();
}
Matrix4x4 matrix = Gizmos.matrix;
Gizmos.matrix = identity;
for (int i = 0; i < num; i++)
{
ParticleSystem.Particle particle = particles[i];
Vector3 vector = particle.GetCurrentSize3D(system);
Gizmos.DrawWireSphere(particle.position, (Math.Max(vector.x, Math.Max(vector.y, vector.z)) * 0.5f) * system.trigger.radiusScale);
}
Gizmos.color = color;
Gizmos.matrix = matrix;
}
}