Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  User Data
#1
Now in my game im turn off emitters (emitter.life[i]=0fand emiter.speed=0) and after the time ,im turn on emiters but userData set to NaN NaN NaN(after emitter turn on).How i can set user data or what i do wrong?

This is after i mixing Obi Emitters second time(after turn on in realtime):
[Image: CQd2h2M.png]
Reply
#2
(27-03-2020, 11:07 AM)palad333 Wrote: Now in my game im turn off emitters (emitter.life[i]=0fand emiter.speed=0) and after the time ,im turn on emiters but userData set to NaN NaN NaN(after emitter turn on).How i can set user data or what i do wrong?

This is after i mixing Obi Emitters second time(after turn on in realtime):
[Image: CQd2h2M.png]

Hi there,

Can't reproduce. Both life and emitter speed are completely unrelated to userData, I don't see how changing them could affect the data stored in that array. How are you using the userData array?
Reply
#3
(28-03-2020, 10:31 AM)josemendez Wrote: Hi there,

Can't reproduce. Both life and emitter speed are completely unrelated to userData, I don't see how changing them could affect the data stored in that array. How are you using the userData array?

To turn off the liquid I set the speed to 0 and the emitter life set to 0.
To turn on the liquid I set the speed to 2 and the emitter life set to 9999.

so I try to write the user date, but it does not work:
for(int i=0;i<emitter.solverindicies.length;i++)
emitter.solver.userData[emitter.solverIndices[i]] = new Vector4(3333);

But, even if I do not change the user date after TurnOn the user date set to NaN

I also the change mass after turning on the emitter:
emitters.solver.invMasses[emitters.solverIndices[index]] = 0;
and after 2 seconds, return the mass to the previous value
after this i try mixing fluid again

I use user data to mix two types of emitters(example lava(user data (9,9,9,9)) and water(user data(1,1,1,1))).
If value of user data=mid (user data 1 and user data 2 )(~5,5,5,5)  i,m do something.
Reply
#4
(28-03-2020, 10:49 AM)palad333 Wrote: To turn off the liquid I set the speed to 0 and the emitter life set to 0.
To turn on the liquid I set the speed to 2 and the emitter life set to 9999.

so I try to write the user date, but it does not work:
for(int i=0;i<emitter.solverindicies.length;i++)
emitter.solver.userData[emitter.solverIndices[i]] = new Vector4(3333);

But, even if I do not change the user date after TurnOn the user date set to NaN

I also the change mass after turning on the emitter:
emitters.solver.invMasses[emitters.solverIndices[index]] = 0;
and after 2 seconds, return the mass to the previous value
after this i try mixing fluid again

I use user data to mix two types of emitters(example lava(user data (9,9,9,9)) and water(user data(1,1,1,1))).
If value of  user data=mid (user data 1 and user data 2 )(~5,5,5,5)  i,m do something.

Hi,

Setting the inverse mass to zero makes a particle infinitely heavy. For fluid particles, this makes no sense (as a particle with infinite mass, is also infinitely dense). Why do you need this?
Reply