You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
580 B
13 lines
580 B
floatNx3 randomRotationMatrices[3];
|
|
if (rotationRandomnessX > epsilon() || rotationRandomnessY > epsilon())
|
|
{
|
|
// Parameters are being double indented.
|
|
floatNx3 rotationEuler = floatNx3(
|
|
(GenerateRandom(randomSeed + intN(kParticleSystemExternalForcesRotationRandomnessXId)) * 2 - 1) * rotationRandomnessX,
|
|
(GenerateRandom(randomSeed + intN(kParticleSystemExternalForcesRotationRandomnessYId)) * 2 - 1) * rotationRandomnessY,
|
|
floatN(ZERO));
|
|
eulerToMatrix(rotationEuler, randomRotationMatrices);
|
|
|
|
toForce = mul(randomRotationMatrices, toForce);
|
|
}
|