Jump to content

VEX get particle life?


Atom

Recommended Posts

Hello All,

 

I can't seem to find the syntax for fetching the life values from a particle system. For some reason they are stored as life[0] and life[1] in the geometry spreadsheet instead of simple floats.

 

When I try to fetch the life value I get VEX errors.

float current_particle_life = f@life[0];

if I try to fetch it as vector I no longer get an error but the value returned is always zero.

float current_particle_life = v@life[0];

If I fetch the attribute directly I do get a value but it does not match the values in the spreadsheet?

float current_particle_life = f@life;

I also want to fetch life[1] which is the death time of the particle.

 

Does anyone know the correct syntax for fetching both parts of the life attribute into individual floats?

Link to comment
Share on other sites

Ah, thank you.

 

It looks like I needed the short character 'u' to access that type of variable.

float current_particle_life = u@life[0];
float current_particle_death = u@life[1];
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...