blob: 8d467c67af6f5b4ff3ba167f2089fa0c436d8c03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
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);
}
|