// -------------------------------------------------------------------------------------- // Legacy Only... public static void ConvertToStaticScale(ParticleEmitter pe, ParticleAnimator pa) { if (pe == null) { return; } Vector3 vecVelScale = (pe.transform.lossyScale); float fVelScale = (NcTransformTool.GetTransformScaleMeanValue(pe.transform)); float fScale = (NcTransformTool.GetTransformScaleMeanValue(pe.transform)); pe.minSize *= fScale; pe.maxSize *= fScale; pe.worldVelocity = Vector3.Scale(pe.worldVelocity, vecVelScale); pe.localVelocity = Vector3.Scale(pe.localVelocity, vecVelScale); pe.rndVelocity = Vector3.Scale(pe.rndVelocity, vecVelScale); pe.angularVelocity *= fVelScale; pe.rndAngularVelocity *= fVelScale; pe.emitterVelocityScale *= fVelScale; if (pa != null) { pa.rndForce = Vector3.Scale(pa.rndForce, vecVelScale); pa.force = Vector3.Scale(pa.force, vecVelScale); // pa.damping *= fScale; } Vector3 ellipsoid; float minEmitterRange; NgSerialized.GetEllipsoidSize(pe, out ellipsoid, out minEmitterRange); NgSerialized.SetEllipsoidSize(pe, ellipsoid * fScale, minEmitterRange * fScale); // NgAssembly.LogFieldsPropertis(pe); }