Jump to content

particle question


pszczesny

Recommended Posts

Hi,

I found this setup for particle morph:

float strength = ch("strength");
float arrivedistance = ch("arrivedistance");

int goalpt = @id % npoints(@OpInput3);

vector goalpos = point(2, "P", goalpt);
f@goaldistance = distance(goalpos, @P);

vector goaldir = normalize(goalpos - @P);

@v = goaldir * strength * fit(@goaldistance, 0, arrivedistance, 0, 1);

 

Setup is very nice but it would be super to add functionality.

Im new to vex. Is it possible to move particle into the nearest point on the target, because at the moment (I attached screenshots) particles morph in random way (evenly fills the entire object )? It would be perfect to fill object starting from the closest point.



I will be very grateful for your help.

 

Regards,

Pawel
 

1.png

2.png

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...