Jump to content

Storing and reevaluating point positions

Recommended Posts

Hello good people,

Let's say I have a particle simulation, I would like to store the position of every point at the starting frame and then later on, say frame 25, I'd like to reevaluate each point position. If the new number is different than that on frame one, ie the particle moved, something happens to the particle, it stops, turns green, whatever.

Basically some kind of if statement, 

if newVal != oldVal:

     turn green

Any help is welcome!


Link to comment
Share on other sites

Freeze frame and use point wrangle with first input actual points second - freeze one.

int pt = findattribval(1, 'point', 'id', @id);
vector pos = point(1,'P',pt);
 do what you need

your points should have id attribute

  • Like 1
  • Thanks 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.

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