Jump to content
Sign in to follow this  
arda3d

Creating a force array in vex

Recommended Posts

Hi all,

 

I am struggling to write a force array per particle, i have an float array per particle named "upforce" and i want to use this array as my "y" force. Any tips?

 

Thanks :rolleyes:

Share this post


Link to post
Share on other sites

I don't understand.. a force is a vector so if you just want to modify the y-component of that forcevector you cannot use an array. You can only use a single element of that array.

Share this post


Link to post
Share on other sites
1 minute ago, 3dome said:

I don't understand.. a force is a vector so if you just want to modify the y-component of that forcevector you cannot use an array. You can only use a single element of that array.

The thing is, i want to apply a force per point..

Share this post


Link to post
Share on other sites

yes sure. you can do something like this:

float upforce = fit01(rand(@id), ch("min_force"), ch("max_force"));

v@force = set(0, upforce, 0);

 

 

Share this post


Link to post
Share on other sites
19 minutes ago, 3dome said:

yes sure. you can do something like this:

float upforce = fit01(rand(@id), ch("min_force"), ch("max_force"));

v@force = set(0, upforce, 0);

 

 

this is it!

 

Thanks:ph34r:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×